运维开发网

Remove Old Kernels on CentOS/RHEL

运维开发网 https://www.qedev.com 2020-04-24 13:32 出处:网络 作者:运维开发网整理
This is very easy task, you need yum-utils package. Check Installed Kernels rpm -q kernelkernel-2.6.32-279.el6.x86_64kernel-2.6.32-279.2.1.el6.x86_64kernel-2.6.32-279.5.2.el6.x86_64kernel-2.6.3

This is very easy task, you need yum-utils package.

  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

  1. Delete / Remove Old Kernels

##CentOS, Red Hat (RHEL)

yum install yum-utils

##Package-cleanup set count as how many old kernels you want left

package-cleanup --oldkernels --count=2

  1. Make Amount of Installed Kernels Permanent

Edit /etc/yum.conf or /etc/dnf/dnf.conf and set installonly_limit:installonly_limit=2

0

精彩评论

暂无评论...
验证码 换一张
取 消