August 13, 2013

卸载linux旧内核

当linux内核更新后,开机的GRUB引导菜单中会存在新旧内核多个引导菜单,当新内核使用稳定后,我们可以将旧的内核删除以减少开机引导项,以下是在fedora与ubuntu中删除旧内核的方法,其他的YUM系或APT系系统可以参考参考

fedora中删除旧内核:

[aquan@localhost ~]$ uname -r
2.6.32-220.13.1.el6.i686
[aquan@localhost ~]$ rpm -qa|grep kernel
kernel-2.6.32-220.13.1.el6.i686
kernel-2.6.32-220.el6.i686
kernel-firmware-2.6.32-220.13.1.el6.noarch
dracut-kernel-004-256.el6_2.1.noarch
[aquan@localhost ~]$ sudo yum remove kernel-2.6.32-220.el6.i686

ubunu中删除旧内核:

sudo apt-get purge ~ilinux-image-.*\(\!`uname -r`\)

© unixetc.com 2012 - 2019
README