Est-il utile de purger un paquet de noyau au lieu de le supprimer ? Je pose cette question parce que la suppression automatique des paquets ne purge pas tous les paquets qu'elle supprime. (J'ai configuré cette suppression automatique dans /etc/apt/apt.conf.d/50unattended-upgrades
et on dit qu'elle est équivalente à apt-get autoremve
) Au moins dpkg-query -L
pour un tel paquet donne
Package 'linux-image-4.2.0-21-generic' does not contain any files (!)
ce qui suggère qu'il n'y a pas de fichiers de configuration qui traînent. dpkg-query
indique l'état deinstall ok config-files
para linux-image-4.2.0-21-generic
. Pour le paquet d'en-têtes correspondant linux-headers-4.2.0-21-generic
, dpkg-query
indique l'état not-installed
et pour linux-headers-4.2.0-21
il n'y a pas de correspondance après l'opération de suppression automatique.
Pour ce qu'il vaut, voici un extrait de /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
:
Removing linux-headers-4.2.0-21-generic (4.2.0-21.25) ...
Removing linux-headers-4.2.0-21 (4.2.0-21.25) ...
Removing linux-image-extra-4.2.0-21-generic (4.2.0-21.25) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.2.0-21-generic /boot/vmlinuz-4.2.0-21-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.2.0-21-generic /boot/vmlinuz-4.2.0-21-generic
Error! Your kernel headers for kernel 4.2.0-21-generic cannot be found.
Please install the linux-headers-4.2.0-21-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
Error! Your kernel headers for kernel 4.2.0-21-generic cannot be found.
Please install the linux-headers-4.2.0-21-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.2.0-21-generic /boot/vmlinuz-4.2.0-21-generic
update-initramfs: Generating /boot/initrd.img-4.2.0-21-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.2.0-21-generic /boot/vmlinuz-4.2.0-21-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.2.0-21-generic /boot/vmlinuz-4.2.0-21-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.2.0-21-generic /boot/vmlinuz-4.2.0-21-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.2.0-21-generic /boot/vmlinuz-4.2.0-21-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.2.0-23-generic
Found initrd image: /boot/initrd.img-4.2.0-23-generic
Found linux image: /boot/vmlinuz-4.2.0-22-generic
Found initrd image: /boot/initrd.img-4.2.0-22-generic
Found linux image: /boot/vmlinuz-4.2.0-21-generic
Found initrd image: /boot/initrd.img-4.2.0-21-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
Removing linux-image-4.2.0-21-generic (4.2.0-21.25) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.2.0-21-generic /boot/vmlinuz-4.2.0-21-generic
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.2.0-21-generic /boot/vmlinuz-4.2.0-21-generic
update-initramfs: Deleting /boot/initrd.img-4.2.0-21-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.2.0-21-generic /boot/vmlinuz-4.2.0-21-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.2.0-23-generic
Found initrd image: /boot/initrd.img-4.2.0-23-generic
Found linux image: /boot/vmlinuz-4.2.0-22-generic
Found initrd image: /boot/initrd.img-4.2.0-22-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done