卸载ubuntu旧的内核 博客分类: unix like UbuntuLinux
程序员文章站
2024-03-25 09:09:28
...
查询当前使用的内核
查询已经安装的内核
ii linux-headers-2.6.32-22
ii linux-headers-2.6.32-22-generic
ii linux-headers-2.6.32-24
ii linux-headers-2.6.32-24-generic
ii linux-headers-2.6.32-25
ii linux-headers-2.6.32-25-generic
rc linux-image-2.6.31-10-rt
ii linux-image-2.6.32-21-generic
ii linux-image-2.6.32-22-generic
ii linux-image-2.6.32-24-generic
ii linux-image-2.6.32-25-generic
卸载不需要的旧内核
卸载标识为rc的包
uname -a
查询已经安装的内核
dpkg -l|grep linux
ii linux-headers-2.6.32-22
ii linux-headers-2.6.32-22-generic
ii linux-headers-2.6.32-24
ii linux-headers-2.6.32-24-generic
ii linux-headers-2.6.32-25
ii linux-headers-2.6.32-25-generic
rc linux-image-2.6.31-10-rt
ii linux-image-2.6.32-21-generic
ii linux-image-2.6.32-22-generic
ii linux-image-2.6.32-24-generic
ii linux-image-2.6.32-25-generic
卸载不需要的旧内核
sudo apt-get remove linux-image-2.6.32-24-generic
sudo apt-get remove linux-headers-2.6.32-24
卸载标识为rc的包
dpkg -l | grep ^rc | cut -d' ' -f3|sudo xargs dpkg -P