Quantcast
Viewing all articles
Browse latest Browse all 5120

Advanced users • Re: unused files in /usr/lib/modules/

Also
sudo apt autoremove --purge
does not remove the modules.* files including the directory.

The kernel is a multi-version package, per build architecture, so for aarch64 with 4k pages name is: linux-image-rpi-v8
An example version string is: linux-image-6.6.31+rpt-rpi-v8

Below is a Pi I did not do an explicit clean-up for quite some time:

Code:

root@raspi3:~# apt list | grep linux-image | grep "\["linux-image-6.6.20+rpt-rpi-v8/stable,now 1:6.6.20-1+rpt1 arm64 [residual-config]linux-image-6.6.28+rpt-rpi-v8/stable,now 1:6.6.28-1+rpt1 arm64 [installed,auto-removable]linux-image-6.6.31+rpt-rpi-v8/stable,now 1:6.6.31-1+rpt1 arm64 [installed,automatic]linux-image-6.6.47+rpt-rpi-v8/stable,now 1:6.6.47-1+rpt1 arm64 [installed,automatic]linux-image-rpi-v8/stable,now 1:6.6.47-1+rpt1 arm64 [installed]
The :6.6.28-1+rpt1 is still completely there , also in /boot
If I would do apt update && apt full-upgrade now, 6.6.28+rpt-rpi-v8 will also become residual-config

In my notes:
https://ubuntuforums.org/showthread.php?t=1924525
How do I remove "residual config" through the Terminal?
apt-get purge $(dpkg -l | grep '^rc' | awk '{print $2}')

That works, but really auto clean-up everything I have some bad experience, as not always it is perfect dependencies. Especially not when you did in-place dist-upgrade, e.g. bullseye to bookworm and you run some software that only runs with bullseye packages/versions and not with newer setups in bookworm. I once did clean-up all deb9 deb10 and deb11 stuff, that did break a current version of Domoticz for example.

As far as I see, the directories in /usr/lib/modules represent separate packages w.r.t apt. A user setting is there somewhere which determines how many older kernels you want to keep. Default is 2

Statistics: Posted by redvli — Mon Sep 09, 2024 6:40 am



Viewing all articles
Browse latest Browse all 5120

Trending Articles