How to remove old kernels from Centos

How to remove old kernels from Centos

 There is command that is part of yum-utilities:

package-cleanup
count=1 means leave 1 the newest kernel untouched. 
# package-cleanup --oldkernels --count=1
Loaded plugins: fastestmirror
--> Running transaction check
---> Package kernel.x86_64 0:3.10.0-327.36.3.el7 will be erased
---> Package kernel.x86_64 0:3.10.0-514.2.2.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

===================================
 Package                           
===================================
Removing:
 kernel                                         
 kernel    

Transaction Summary
====================================
Remove  2 Packages

Installed size: 284 M
Is this ok [y/N]:

Comments

Popular posts from this blog

How to clean DB from old logs in Magento 1.x

Reduce (shrink) and resize raw disk at Proxmox

Apache 2.4 + mod_wsgi + Python 3.7 + Django installation on Centos 7.10