Package: linux-image-amd64 Version: 5.14.12-1 I tried to purge linux-image-5.14.0-1-amd64 yesterday and ran into an error. I additionally tried to purge linux-image-5.14.0-2-amd64 today following the release of linux-image-5.14.0-3-amd64 and ran into the same error, which I've copied below.
Please can you advise how to clean up after the failure, is removal of the old '/lib/modules/5.14.0-x-amd64' directories and their contents sufficient? $ sudo dpkg --purge linux-image-5.14.0-2-amd64 (Reading database ... 274461 files and directories currently installed.) Removing linux-image-5.14.0-2-amd64 (5.14.9-2) ... /etc/kernel/prerm.d/dkms: dkms: removing: (5.14.0-2-amd64) (x86_64) Error! Arguments <module> and <module-version> are not specified. Usage: remove <module>/<module-version> or remove -m <module>/<module-version> or remove -m <module> -v <module-version> I: /vmlinuz.old is now a symlink to boot/vmlinuz-5.14.0-3-amd64 I: /initrd.img.old is now a symlink to boot/initrd.img-5.14.0-3-amd64 /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-5.14.0-2-amd64 /etc/kernel/postrm.d/zz-update-grub: Generating grub configuration file ... Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-5.14.0-3-amd64 Found initrd image: /boot/initrd.img-5.14.0-3-amd64 Adding boot menu entry for EFI firmware configuration done Purging configuration files for linux-image-5.14.0-2-amd64 (5.14.9-2) ... rmdir: failed to remove '/lib/modules/5.14.0-2-amd64': Directory not empty dpkg: warning: while removing linux-image-5.14.0-2-amd64, directory '/lib/modules/5.14.0-2-amd64' not empty so not removed