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 Menu
Grub Menu

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"

[bottomads][/bottomads]

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.