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
6
  • Damn - sorry for the formatting... Apr 30, 2015 at 18:38
  • You can always edit your post and format it by highlighting the text and clicking the icon above the text-box. or wait for someone else to do it for you.
    – user68186
    Apr 30, 2015 at 18:55
  • I have never had *.old-dkms files. What did you do to have them?
    – jarno
    Apr 2, 2017 at 8:51
  • @jarno They get created by Dell's DKMS (Dynamic Kernel Management System) for modules not included in mainline kernel. For example nvidia and bbsswitch source when compiled might replace /boot/initrd.img so make a backup copy which can be restored if dkms is used to uninstall the changes. I'm working today to update my rm-kernels bash script to delete them obsolete .old-dkms. Aug 7, 2017 at 15:02
  • @jarno As per my answer below revising the bash script is no longer required. People just need a one time manual process to delete /boot/*.old-dkms that belong to removed kernels. Aug 7, 2017 at 15:39

3 Answers 3

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
13
  • Thank you for the bug link. Upon reviewing it I discovered a fix was made upstream in April 2017. It saved me revising a bash script as I answered below. Aug 7, 2017 at 15:37
  • Yes! I actually just happened to notice this morning that those old-dkms files were being successfully removed now. Nice coincidence there.
    – Nicomachus
    Aug 7, 2017 at 19:07
  • @WinEunuuchs2Unix oh, it seems my fix has made it to some Ubuntu release. The respective Launchpad bug report is here. Which version of dkms you are using?
    – jarno
    Aug 7, 2017 at 20:18
  • @jarno Currently I'm running 2.2.0.3 but I have no idea what version was running when the obsolete initrd.img*.old-dkms files were left behind. Aug 7, 2017 at 20:37
  • @WinEunuuchs2Unix dkms 2.2.0.3-1.1ubuntu5.14.04.9 (in Ubuntu 14.04) seems not to have the fix. Even 16.10 uses version 2.2.0.3. So I do not know what deleted the .old-dkms files in your system.
    – jarno
    Aug 7, 2017 at 20:53
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.

You must log in to answer this question.

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