如何卸载Ubuntu中多余内核

http://blog.csdn.net/forlong401/article/details/6200877

1.使用这个命令可以查看当前系统使用的内核:

lee@lee:/$ uname -a 
Linux lee 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:48 UTC 2011 i686 GNU/Linux

 

2.列出所有安装的内核,带有image的就是内核文件:

lee@lee:~$ dpkg --get-selections|grep linux 
libselinux1                    install
linux-firmware                    install
linux-generic                    install
linux-headers-2.6.35-22                install
linux-headers-2.6.35-22-generic            install
linux-headers-2.6.35-25                install
linux-headers-2.6.35-25-generic            install
linux-headers-generic                install
linux-image-2.6.35-22-generic            install
linux-image-2.6.35-25-generic            install
linux-image-generic                install
linux-libc-dev                    install
linux-sound-base                install
pptp-linux                    install
syslinux                    install
syslinux-common                    install
util-linux                    install

 

3.从中选择要卸载的包,用apt-get remove来卸载

lee@lee:~$ sudo apt-get remove linux-image-2.6.35-22-generic 
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列软件包将被【卸载】:
  linux-image-2.6.35-22-generic
升级了 0 个软件包,新安装了 0 个软件包,要卸载 1 个软件包,有 0 个软件包未被升级。
解压缩后将会空出 107MB 的空间。
您希望继续执行吗?[Y/n]Y
(正在读取数据库 ... 系统当前共安装有 145154 个文件和目录。)
正在卸载 linux-image-2.6.35-22-generic ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 2.6.35-22-generic /boot/vmlinuz-2.6.35-22-generic
dkms: uninstalling: bcmwl 5.60.48.36+bdcom (2.6.35-22-generic) (i686)

-------- Uninstall Beginning --------
Module:  bcmwl
Version: 5.60.48.36+bdcom
Kernel:  2.6.35-22-generic (i686)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

wl.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.35-22-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.
depmod..........

DKMS: uninstall Completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.35-22-generic /boot/vmlinuz-2.6.35-22-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 2.6.35-22-generic /boot/vmlinuz-2.6.35-22-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-25-generic
Found initrd image: /boot/initrd.img-2.6.35-25-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sda1
Found Ubuntu 10.10 (10.10) on /dev/sda6
done
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old 
 you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old 
 you may need to re-run your boot loader[grub]
lee@lee:~$ dpkg --get-selections|grep linux
libselinux1                    install
linux-firmware                    install
linux-generic                    install
linux-headers-2.6.35-22                install
linux-headers-2.6.35-22-generic            install
linux-headers-2.6.35-25                install
linux-headers-2.6.35-25-generic            install
linux-headers-generic                install
linux-image-2.6.35-22-generic            deinstall
linux-image-2.6.35-25-generic            install
linux-image-generic                install
linux-libc-dev                    install
linux-sound-base                install
pptp-linux                    install
syslinux                    install
syslinux-common                    install
util-linux                    install


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值