0

Is it safe to remove linux-image-5.10.0-21-amd64, linux-image-5.10.0-23-amd64 packages? After removing some unnecessary firefox language packs with dependencies, I was prompted to autoremove a few packages that were no longer needed: hunspell-gl-es, hunspell-sv-se, linux-image-5.10.0-21-amd64, linux-image-5.10.0-23-amd64.

$ sudo apt autoremove Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages will be REMOVED: hunspell-gl-es hunspell-sv-se linux-image-5.10.0-21-amd64 linux-image-5.10.0-23-amd64 0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded. After this operation, 636 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 253674 files and directories currently installed.) Removing hunspell-gl-es (1:7.1.0~rc3-3) ... Removing hunspell-sv-se (1:7.1.0~rc3-3) ... Removing linux-image-5.10.0-21-amd64 (5.10.162-1) ... /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-5.10.0-21-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.10.0-25-amd64 Found initrd image: /boot/initrd.img-5.10.0-25-amd64 Found linux image: /boot/vmlinuz-5.10.0-24-amd64 Found initrd image: /boot/initrd.img-5.10.0-24-amd64 Found linux image: /boot/vmlinuz-5.10.0-23-amd64 Found initrd image: /boot/initrd.img-5.10.0-23-amd64 Found linux image: /boot/vmlinuz-5.10.0-9-amd64 Found initrd image: /boot/initrd.img-5.10.0-9-amd64 Warning: os-prober will be executed to detect other bootable partitions. Its output will be used to detect bootable binaries on them and create new boot entries. done Removing linux-image-5.10.0-23-amd64 (5.10.179-3) ... /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-5.10.0-23-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.10.0-25-amd64 Found initrd image: /boot/initrd.img-5.10.0-25-amd64 Found linux image: /boot/vmlinuz-5.10.0-24-amd64 Found initrd image: /boot/initrd.img-5.10.0-24-amd64 Found linux image: /boot/vmlinuz-5.10.0-9-amd64 Found initrd image: /boot/initrd.img-5.10.0-9-amd64 Warning: os-prober will be executed to detect other bootable partitions. Its output will be used to detect bootable binaries on them and create new boot entries. done 

Edit:

current packages:

$ apt list -i 'linux-image*' Listing... Done linux-image-5.10.0-24-amd64/now 5.10.179-5 amd64 [installed,local] linux-image-5.10.0-25-amd64/oldstable-security,now 5.10.191-1 amd64 [installed,automatic] linux-image-5.10.0-26-amd64/oldstable,now 5.10.197-1 amd64 [installed,automatic] linux-image-5.10.0-9-amd64/now 5.10.70-1 amd64 [installed,local] linux-image-amd64/oldstable,now 5.10.197-1 amd64 [installed] 

1 Answer 1

1

That should be safe, apt is pretty good at keeping track of required kernels; unless you have a pretty borked apt database.

It might pay to check your currently active kernel (make sure it has a higher version number). Apt usually keeps 2 to 3 generations of kernels around and integrated into grub.

If you have aptitude installed a quick check would be:

aptitude search ~ilinux-image 

Without aptitude:

dpkg --get-selections | awk '/linux-image/ && $2=="install"' 

Or install aptitude ;D

3
  • bash: aptitude: command not found Commented Oct 7, 2023 at 22:15
  • @minto see updated answer. Commented Oct 7, 2023 at 23:21
  • 1
    ... or apt list -i 'linux-image*'. Also check your running kernel (uname -r). Commented Oct 8, 2023 at 4:28

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.