首先显示现在已安装的内核版本列表
dpkg --get-selections|grep linux
显示如下:
libselinux1 install
linux-firmware install
linux-generic install
linux-generic-pae install
linux-headers-2.6.31-15 install
linux-headers-2.6.31-15-generic install
linux-headers-2.6.31-15-generic-pae install
linux-headers-2.6.31-16 install
linux-headers-2.6.31-16-generic install
linux-headers-2.6.31-16-generic-pae install
linux-headers-generic install
linux-headers-generic-pae install
linux-headers-server install
linux-image-2.6.31-14-generic install
linux-image-2.6.31-14-generic-pae install
linux-image-2.6.31-15-generic install
linux-image-2.6.31-15-generic-pae install
linux-image-2.6.31-16-generic install
linux-image-2.6.31-16-generic-pae install
linux-image-generic install
linux-image-generic-pae install
linux-image-server install
linux-libc-dev install
linux-server install
linux-sound-base install
syslinux install
util-linux install
然后我要卸掉旧的版本 2.6.31-15
sudo apt-get remove linux-headers-2.6.31-15
显示结果如下:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不再被使用了:
libclucene0ldbl libqt4-opengl libxine1-x kdebase-runtime-data-common kdebase-runtime libqt4-sql-mysql libqt4-dbus libxine1-misc-plugins kdelibs5 libxcb-xv0 libqt4-qt3support
libknotificationitem1 python-chm kde-icons-oxygen libxine1-bin libexiv2-5 liblzma0 libsoprano4 kdebase-runtime-bin-kde4 libqt4-webkit kdelibs5-data libxcb-shape0 libqt4-sql
libqt4-svg libstreamanalyzer0 libqt4-xml libplasma3 phonon-backend-xine libqt4-designer kdelibs-bin libqt4-phonon khelpcenter4 libstreams0 exiv2 libqt4-script libxcb-shm0
soprano-daemon kdebase-runtime-data libxine1-console libxine1
使用'apt-get autoremove'来删除它们
下列软件包将被【卸载】:
linux-headers-2.6.31-15 linux-headers-2.6.31-15-generic linux-headers-2.6.31-15-generic-pae
共升级了 0 个软件包,新安装了 0 个软件包,要卸载 3 个软件包,有 0 个软件未被升级。
解压缩后将会空出 90.8MB 的空间。
您希望继续执行吗?[Y/n]y
(正在读取数据库 ... 系统当前总共安装有 175128 个文件和目录。)
正在删除 linux-headers-2.6.31-15-generic-pae ...
正在删除 linux-headers-2.6.31-15-generic ...
正在删除 linux-headers-2.6.31-15 ...