cleaning old kernels the easy way

There is a built in tool to remove old unused kernels thats installed onto the system. You can just as easily remove it and clean grub entries but this is an automated method and you can even set an option to keep x amounts.

step 1 – install the yum utils package
yum install yum-utils

step 2 – run the package-cleanup to clean up old kernels
package-cleanup --oldkernels --count=2

step 3 – if you want to set it so that you only keep X number of revisions on your system then edit /etc/yum.conf and add the following



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.