4

I have one kernel installed currently, 3.10.0-327.28.3.

In my /boot directly, I have what looks like a lot of stuff that package-cleanup perhaps missed:

 -rw-r--r-- 1 root root 17M Aug 28 18:00 initramfs-3.10.0-327.10.1.el7.x86_64.img -rw-r--r-- 1 root root 17M Aug 28 18:00 initramfs-3.10.0-327.28.2.el7.x86_64.img -rw-r--r-- 1 root root 20M Aug 29 00:46 initramfs-3.10.0-327.28.3.el7.x86_64.img -rw-r--r-- 1 root root 17M Aug 28 17:00 initramfs-3.10.0-327.28.3.el7.x86_64kdump.img -rw-r--r-- 1 root root 17M Aug 28 18:01 initramfs-3.10.0-327.4.5.el7.x86_64.img 

Can I remove those 3 files safely? They look like they belong to older kernels.

3
  • 6
    unix.stackexchange.com/questions/233597/… Commented Aug 29, 2016 at 8:27
  • 1
    @user4556274 package-cleanup is ignoring these files for some reason. Commented Aug 29, 2016 at 8:32
  • 1
    This is not a duplicate of the above mentioned question as it regards files left over by the solutions suggested there. Commented Sep 19, 2019 at 18:04

1 Answer 1

3

Yes. Those files are from previous kernel installation. You may had upgraded kernel hence old kernel files along with their initramfs files are residing on /boot partition.

If you want to clean up them then you can remove by using distribution-specific utility like apt-get.

Once you remove, then execute the following command to remove those kernel's entry from grub.cfg file

grub-mkconfig -o /boot/grub/grub.cfg

if you have legacy grub installed then modify the /boot/grub/grub.conf file manually.

2
  • 1
    Is it harmful just to delete the files and not change the grub config file? Commented Dec 13, 2018 at 13:23
  • 1
    In case your system is using grub2 issue this command: grub2-mkconfig -o /boot/grub2/grub.cfg Commented Apr 29, 2020 at 3:23

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.