Linux下删除多余的内核
Remove Unwanted Kernels
2021-05-29 17:07:18
Devops
309

uname -a 查看当前内核的版本号

Linux localhost.localdomain 2.6.32-358.23.2.el6.i686 #1 SMP Wed Oct 16 17:21:31 UTC 2013 i686 i686 i386 GNU/Linux

rpm -qa | grep kernel查找要删除的版本号

kernel-firmware-2.6.32-358.23.2.el6.noarch abrt-addon-kerneloops-2.0.8-16.el6.centos.1.i686 kernel-devel-2.6.32-358.el6.i686 dracut-kernel-004-303.el6.noarch kernel-2.6.32-358.23.2.el6.i686 kernel-devel-2.6.32-358.23.2.el6.i686 kernel-2.6.32-358.el6.i686 kernel-headers-2.6.32-358.23.2.el6.i686 libreport-plugin-kerneloops-2.0.9-15.el6.centos.1.i686 以上是我电脑上的内核版本号,其中红色为要删除的版本号

  • yum remove kernel-devel-2.6.32-358.el6.i686
  • yum remove kernel-2.6.32-358.el6.i686

查看grub.conf发现多余的启动项已经删除