Cleaning Up GNU GRUB – Removing Old Kernels

I had Fedora 17 installed and decided to upgrade to Fedora 18, upon upgrading I noticed in GRUB menu options Fedora 17 was still listed. As a good and organized computer user, I started looking and asking how to clean this messy looking GRUB and found the solution.

Update: Now I know these are the old kernels. When you update to latest Linux kernel, the previous one stays there and you could boot from it if you wanted to. This way you could test the new kernel and later delete the previous one with the below command.

This is how my GRUB menu looked like after the upgrade:

grub_blog

And below is the command to clean GRUB, run it in terminal and next time you turn on your system, GRUB will display only the correct OS list.

 su -c "package-cleanup --oldkernels --count=1"





 

Esau Silva
Software Engineer at Region One ESC
Microsoft Full Stack Application Developer
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed.
Share