每次更新了內核之后,都會在啟動項多兩個選項,時間長了是比較惱人的,可以使用下面的命令來清除:
root@zhihua-ThinkPad-T43:/boot/grub# uname -a
Linux zhihua-ThinkPad-T43 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 10:18:49 UTC 2010 i686 GNU/Linux
root@zhihua-ThinkPad-T43:/boot/grub# dpkg --get-selections |grep linux|grep image
linux-image-2.6.35-22-generic install
linux-image-2.6.35-23-generic install
linux-image-generic install
root@zhihua-ThinkPad-T43:/boot/grub#apt-get remove linux-image-2.6.35-22-generic
.
root@zhihua-ThinkPad-T43:/boot/grub# dpkg --get-selections |grep linux|grep image
linux-image-2.6.35-22-generic deinstall
linux-image-2.6.35-23-generic install
linux-image-generic install
root@zhihua-ThinkPad-T43:/boot/grub#update-grub
//這個會更新/boot/grub/grub.cfg中的啟動項
另外還有幾個比較好的命令,用來清除不用的緩存及不需要的軟件包:
apt-get clean //清理所有軟件緩存
apt-get autoremove //刪除系統不再使用的孤立軟件