When I run dpkg --list 'linux-image*', the output shows that I only have 4.10.0-37 installed:

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                      Version           Architecture      Description
un  linux-image               <none>            <none>            (no description available)
ii  linux-image-4.10.0-37-gen 4.10.0-37.41      amd64             Linux kernel image for version 4.10.0 on 64 bit x86 SMP
ii  linux-image-extra-4.10.0- 4.10.0-37.41      amd64             Linux kernel extra modules for version 4.10.0 on 64 bit
ii  linux-image-generic      amd64             Generic Linux kernel image

however, when I show the contents of /boot, there are other old kernels:

[~]$ ls /boot
abi-4.10.0-37-generic     config-4.8.0-37-generic   memtest86+.bin            vmlinuz-4.10.0-37-generic
abi-4.2.0-16-generic      efi               memtest86+.elf            vmlinuz-4.10.0-37-generic.efi.signed
abi-4.2.0-42-generic      grub              memtest86+_multiboot.bin      vmlinuz-4.2.0-16-generic
abi-4.8.0-37-generic      initrd.img-4.10.0-37-generic  System.map-4.10.0-37-generic  vmlinuz-4.2.0-42-generic
config-4.10.0-37-generic  initrd.img-4.2.0-16-generic   System.map-4.2.0-16-generic   vmlinuz-4.2.0-42-generic.efi.signed
config-4.2.0-16-generic   initrd.img-4.2.0-42-generic   System.map-4.2.0-42-generic   vmlinuz-4.8.0-37-generic
config-4.2.0-42-generic   initrd.img-4.8.0-37-generic   System.map-4.8.0-37-generic   vmlinuz-4.8.0-37-generic.efi.signed

I am running 4.10.0-37:

[~]$ uname -r

Can I safely delete the old kernels () from /boot? Using sudo apt-get remove ... does not do anything, because they are not currently "installed".

  • how did you install those kernels? It seems the most recent one is unknown to dpkg
    – Zanna
    Commented Oct 10, 2017 at 14:03
  • yes, all those orphaned config files can be safely deleted
    – ravery
    Commented Oct 10, 2017 at 14:03
  • I installed them using apt-get, but I think an older "cleaner" tool must have left them.
    – Ralph
    Commented Oct 10, 2017 at 14:03

1 Answer 1


You can safely remove unused kernels from /boot.

Ideally you want to use your package manager (apt) for removal, so you may want to see if you can remove them using:

sudo apt-get purge linux-image-4.2.0-16-generic

or if apt won't work:

sudo dpkg --purge linux-image-4.2.0-16-generic

adding to, or repeating the above for the kernels (4.2.0-16, 4.2.0-42, etc.) you would like to remove.

If the above doesn't work you can remove them manually:

sudo rm /boot/abi-4.2.0-16-generic
sudo rm /boot/config-4.2.0-16-generic
sudo rm /boot/initrd.img-4.2.0-16-generic
sudo rm /boot/System.map-4.2.0-16-generic
sudo rm /boot/vmlinuz-4.2.0-16-generic

or if you like to live dangerously, something like:

sudo rm /boot/*-4.2.0-16-generic

An additional kernel (to the one you're running) is sometimes left as a backup, so you may want to do so in case of issues with the currently running kernel.

After removing these files you should update your boot loader, if you are using GRUB you would do the following:

sudo update-grub

I would also consider whether a "Cleaner" tool that removed packages from apt without removing the files is doing you any good.


As pointed out by WinEunuuchs2Unix, this does not remove the header files. Normally when removing old kernels you would remove not just the image, but the other associated files as well. For example:

apt-get purge linux-image-4.2.0-16-generic linux-image-extra-4.2.0-16-generic linux-headers-4.2.0-16-generic linux-headers-4.2.0-16

See link below for more details.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .