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:


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
Full Stack Software Engineer working with Microsoft technologies, ReactJS is awesome and avid Brazilian Jiu-Jitsu practitioner
Spread the love

Leave a Reply

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