Sunday, February 15, 2015

Deleting old kernels on Fedora/Red Hat/CentOS

Reference: http://www.if-not-true-then-false.com/2012/delete-remove-old-kernels-on-fedora-centos-red-hat-rhel/

Edit /etc/yum.conf and change/add the following line:

    installonly_limit=2
Install yum-utils:
    sudo yum -y install yum-utils
Run command to reduce total kernels to 2:
   package-cleanup --oldkernels --count=2
Just in case, re-build grub2 config file:
   sudo grub2-mkconfig -o /boot/grub2/grub.cfg

No comments: