March 18, 2017 · Fedora
Fedora /boot clean up script
- Check out your current kernel
uname -r
- Check out what is up in your system
rqm -q kernel
- Clean up the kernels
sudo yum remove kernel-XXX #manually replace it as unwanted kernel numbers sudo yum remove kernel-3.7.8-202.fc18.x86_64 #Example
- Confirm Clean up the kernels at
/boot
cd /boot;ls|grep XXX #manually replace it as unwanted kernel numbers cd /boot;ls|grep 3.7.8 #Example
- Remove it
cd /boot;sudo rm -rf $(ls|grep 3.7.8)
- Reload grub2
sudo grub2-mkconfig -o /boot/grub2/grub.cfg sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
More
https://ask.fedoraproject.org/en/question/23316/how-to-delete-old-kernel-version-from-grub/
https://ask.fedoraproject.org/en/question/80362/how-do-i-update-grub-in-fedora-23/