Remove Old Kernels on CentOS/RHEL

前端之家收集整理的这篇文章主要介绍了Remove Old Kernels on CentOS/RHEL前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

原文链接:https://www.f2er.com/centos/374136.html

猜你在找的CentOS相关文章