您的位置:首页 > 其它

如何卸载Ubuntu中多余内核

2013-09-18 14:06 323 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: