Jump to content



Sign in to follow this  
IBMx345

如何删除 CentOS 更新后的旧内核

Recommended Posts

在 CentOS 更新后,并不会自动删除旧内核。所以在启动选项中会有多个内核选项,可以手动使用以下命令删除多余的内核:

1.查看系统当前内核版本:

# uname -a

Linux localhost 2.6.18-274.18.1.el5 #1 SMP Thu Feb 9 12:45:52 EST 2012 i686 i686 i386 GNU/Linux

2.查看系统中全部的内核RPM包:

# rpm -qa | grep kernel

kernel-devel-2.6.18-194.el5
kernel-devel-2.6.18-274.18.1.el5
kernel-headers-2.6.18-274.18.1.el5
kernel-2.6.18-194.el5
kernel-2.6.18-274.18.1.el5

3.删除旧内核的RPM包

yum remove kernel-2.6.18-194.el5
yum remove kernel-devel-2.6.18-194.el5

4.重启系统

# reboot

注意:不需要手动修改/boot/grub/menu.lst


community-logo-original.png

华酷网:http://www.huacool.cn  &  华酷社区:https://bbs.huacool.cn

Share this post


Link to post
Share on other sites
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...