5

I've had a problem with installing kernels, because my /boot partition is very small (about 200+ MB) (and I can't expand because I'm using lvm).

Listing the files inside /boot, I have:

defaultuser@theoriginalpc:~$ ls -lahS /boot
totalo 128M
-rw-r--r--  1 root root  38M Dec 22 14:33 initrd.img-4.4.0-57-generic
-rw-r--r--  1 root root  38M Dec 22 13:12 initrd.img-4.4.0-47-generic.old-dkms
-rw-r--r--  1 root root  17M Dec 22 14:27 initrd.img-4.4.0-57-generic.old-dkms
-rw-r--r--  1 root root  14M Dec 22 14:33 initrd.img-4.4.0-53-generic.old-dkms
-rw-r--r--  1 root root  10M Dec 22 13:13 initrd.img-4.4.0-47-generic
-rw-------  1 root root 6.8M Dec 10 12:04 vmlinuz-4.4.0-57-generic
-rw-------  1 root root 3.7M Dec 10 12:04 System.map-4.4.0-57-generic
-rw-r--r--  1 root root 1.2M Dec 10 12:04 abi-4.4.0-57-generic
-rw-r--r--  1 root root 186K Dec 10 12:04 config-4.4.0-57-generic
-rw-r--r--  1 root root 181K Jan 28  2016 memtest86+_multiboot.bin
-rw-r--r--  1 root root 181K Jan 28  2016 memtest86+.elf
-rw-r--r--  1 root root 179K Jan 28  2016 memtest86+.bin
drwx------  2 root root  12K Nov 18 15:06 lost+found
drwxr-xr-x 25 root root 4.0K Dec 22 14:33 ..
drwxr-xr-x  4 root root 1.0K Dec 22 14:33 .
drwxr-xr-x  6 root root 1.0K Dec 22 14:34 grub

I see that the *.old-dkms files are taking up a lot of space.

Is it okay to remove them?

(Here's the data when ran sudo update-grub)

Generating grub configuration file ...
Averto: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found initrd image: /boot/initrd.img-4.4.0-57-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
farita
5

You can safely remove them.

When DKMS builds a module for the kernel, it can also include it in the initramfs (the initrd files you see in /boot). Before doing so, it does a backup of the current initramfs, adding .old-dkms at the end of the file.

So, unless DKMS crashes while generating the initramfs (quite unlikely), the .old-dkms are of no use afterwards.

If you are a bit paranoid, you should first reboot the machine to verify the kernel and the newly generated initramfs work well, and the remove the .old-dkms.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.