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

Securing the Pi-hole with fail2ban to prevent DNS Amplification attacks

Reduce (shrink) and resize raw disk at Proxmox

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