14

Can't explain why... I assume it isn't safe to simply manually delete them, so some guidance would be appreciated. Here's a ls of my /boot directory (obviously, I'm running the 3.13.0-51 kernel):

-rw-r--r-- 1 root root  1164671 Apr 15 09:03 abi-3.13.0-51-generic
-rw-r--r-- 1 root root   165762 Apr 15 09:03 config-3.13.0-51-generic
drwxr-xr-x 5 root root     1024 Apr 30 14:33 grub
-rw-r--r-- 1 root root 22431280 Nov 26 14:16 initrd.img-3.13.0-36-generic.old-dkms
-rw-r--r-- 1 root root 22427261 Nov 26 14:16 initrd.img-3.13.0-37-generic.old-dkms
-rw-r--r-- 1 root root  9098067 Nov 26 18:00 initrd.img-3.13.0-39-generic.old-dkms
-rw-r--r-- 1 root root  9109727 Feb  5 15:22 initrd.img-3.13.0-40-generic.old-dkms
-rw-r--r-- 1 root root  9110419 Jan 18 02:29 initrd.img-3.13.0-43-generic.old-dkms
-rw-r--r-- 1 root root  9109659 Apr  5 23:11 initrd.img-3.13.0-44-generic.old-dkms
-rw-r--r-- 1 root root  9109097 Apr  5 23:01 initrd.img-3.13.0-46-generic.old-dkms
-rw-r--r-- 1 root root  5814104 Apr 30 14:13 initrd.img-3.13.0-48-generic
-rw-r--r-- 1 root root 22483793 Apr 30 13:52 initrd.img-3.13.0-48-generic.old-dkms
-rw-r--r-- 1 root root  9124331 Apr 30 14:28 initrd.img-3.13.0-49-generic.old-dkms
-rw-r--r-- 1 root root 22496134 Apr 30 13:59 initrd.img-3.13.0-51-generic
-rw-r--r-- 1 root root  4112384 Apr 30 12:16 initrd.img-3.13.0-51-generic.old-dkms
drwx------ 2 root root    12288 Aug  4  2014 lost+found
-rw-r--r-- 1 root root   176500 Mar 12  2014 memtest86+.bin
-rw-r--r-- 1 root root   178176 Mar 12  2014 memtest86+.elf
-rw-r--r-- 1 root root   178680 Mar 12  2014 memtest86+_multiboot.bin
-rw------- 1 root root  3389875 Apr 15 09:03 System.map-3.13.0-51-generic
-rw------- 1 root root  5818368 Apr 15 09:03 vmlinuz-3.13.0-51-generic
user68186
  • 37,461

3 Answers3

10

It is safe to remove them manually. It also looks like there is a bug report filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717584

I can report the same happening here with the 3.13.0-54 kernel and 3.13.0-55 kernel.

-rw-r--r-- 1 root root 1.2M Jun 17 20:03 abi-3.13.0-55-generic
-rw-r--r-- 1 root root 1.2M Jun 19 05:04 abi-3.13.0-57-generic
-rw-r--r-- 1 root root 162K Jun 17 20:03 config-3.13.0-55-generic
-rw-r--r-- 1 root root 162K Jun 19 05:04 config-3.13.0-57-generic
drwxr-xr-x 5 root root  12K Jul 11 15:54 grub
-rw-r--r-- 1 root root  11M Jul  7 21:37 initrd.img-3.13.0-54-generic.old-dkms
-rw-r--r-- 1 root root  27M Jul  4 13:37 initrd.img-3.13.0-55-generic
-rw-r--r-- 1 root root  27M Jul  4 13:37 initrd.img-3.13.0-55-generic.old-dkms
-rw-r--r-- 1 root root  27M Jul  6 18:28 initrd.img-3.13.0-57-generic
-rw-r--r-- 1 root root 173K Mar 12  2014 memtest86+.bin
-rw-r--r-- 1 root root 174K Mar 12  2014 memtest86+.elf
-rw-r--r-- 1 root root 175K Mar 12  2014 memtest86+_multiboot.bin
-rw------- 1 root root 3.3M Jun 17 20:03 System.map-3.13.0-55-generic
-rw------- 1 root root 3.3M Jun 19 05:04 System.map-3.13.0-57-generic
-rw------- 1 root root 5.6M Jun 17 20:03 vmlinuz-3.13.0-55-generic
-rw------- 1 root root 5.6M Jun 19 05:04 vmlinuz-3.13.0-57-generic
3

You could run the command rm /boot/*.old-dkms with Root privileges. However, be sure that the removed *.old-dkms files are not needed by older kernels that you may have installed. You can see a list of your currently installed kernels by executing dpkg-query -l "linux-image-[0-9]*" | grep -e "^ii".

0

I was planning to modify my rm-kernels bash script to delete these old backups if the kernel has been removed with sudo apt purge *<kernel_version>*. However while researching bug reports I found this was fixed upstream in April 2017.

If you don't mind running GUI apps as root you can also use pkexec nautilus to find obsolete backups to delete:

boot-initrd.img.old-dkms

On my system Nautilus reveals kernel versions 4.4.8, 4.9.21 and 4.10.10 are installed and can utilize .old-dkms backups. The highlighted copies are obsolete backups I deleted.

NOTE: pkexec requires policy kit setup. It is designed to replace gksu and gksudo which you will see referenced many times in historical posts.