YUM/DNF Remove Old Kernels on Fedora/CentOS/RHEL - Comment Page: 2

This is quick guide howto delete/remove/clean old kernels on Fedora, CentOS, Red Hat (RHEL). I use here two kernel as example, if you want to keep other more or less, then adjust amount of installed kernels as you wish. Normally reason why you maybe want remove kernels is limited disk space, example on VPS servers and laptop. This is very easy task, you need yum-utils package. [inttf_post_ad1] 1. Check Installed Kernels rpm -q kernel kernel-2.6.32-279.el6.x86_64 kernel-2.6.32-279.2.1.el6.x86_64 kernel-2.6.32-279.5.2.el6.x86_64 kernel-2.6.32-279.9.1.el6.x86_64 2. Delete / Remove Old Kernels ## Install yum-utils ## ## Fedora 25/24/23/22 ## dnf install...

26 comments on “YUM/DNF Remove Old Kernels on Fedora/CentOS/RHEL - Comment Page: 2

1 2
    1. I noticed you have updated this page for those of us running this centuries fedora however you didnt mention that yum-utils has been deprecated – the dnf way of doing this is not very obvious and I gave up on it after reading a half a dozen man pages.

      fortunately deprecated means ‘still works but wont for much longer’ (key words here are ‘still works’) so I used your method which still works :-)

      Another point Id like to make is that nearly all the commands on this page must be run as root

    2. Thank You. Very useful.

    3. I think we should run below command after doing the above configurations

      package-cleanup –oldkernels –count=2

1 2

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.