/var/lib/initramfs files not removed when packages removed

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
einpoklum
Level 1
Level 1
Posts: 26
Joined: Sat Dec 24, 2016 5:14 am
Location: Amsterdam

/var/lib/initramfs files not removed when packages removed

Post by einpoklum » Sun Mar 04, 2018 11:54 am

If I uninstall (without purging) all Linux-kernel-related packages mentioning a certain version, e.g.:

Code: Select all

apt-get remove $(apt-cache search linux | grep X.Y.Z-WW | cut -d\  -f1 )
The folder /var/lib/initramfs-tools/X.Y.Z-WW-generic remains in place. This triggers error messages when running `update-initramfs -k all -u` (which gets run during the installation of certain packages); see below. If I manually remove these files, the error messages go away.

Code: Select all

update-initramfs: Generating /boot/initrd.img-4.13.0-36-generic
Warning: No support for locale: en_US.utf8
update-initramfs: Generating /boot/initrd.img-4.13.0-32-generic
Warning: No support for locale: en_US.utf8
update-initramfs: Generating /boot/initrd.img-4.10.0-42-generic
Warning: No support for locale: en_US.utf8
update-initramfs: Generating /boot/initrd.img-4.8.0-58-generic
Warning: No support for locale: en_US.utf8

update-initramfs: Generating /boot/initrd.img-4.4.0-93-generic
WARNING: missing /lib/modules/4.4.0-93-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-93-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory

Warning: No support for locale: en_US.utf8
depmod: WARNING: could not open /var/tmp/mkinitramfs_dlKiv3/lib/modules/4.4.0-93-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_dlKiv3/lib/modules/4.4.0-93-generic/modules.builtin: No such file or directory
update-initramfs: Generating /boot/initrd.img-4.4.0-77-generic
... etc ...

Post Reply

Return to “Software & Applications”