转帖+验证+配图:清理/boot分区

2014/11/0509:16:14转帖+验证+配图:清理/boot分区已关闭评论 1,501 views

内容来自网络。

使用ubuntu server的默认分区,/boot区大概只有250mb左右,

一般使用几个月,boot区就满了,本文介绍 清理/boot分区。

1:使用df -h 查看 /boot分区大小

清理boot分区00

 

 

 

 

 

 

2:查看系统现有安装的内核

dpkg --get-selections|grep linux-image
清理boot分区01

 

 

 

 

 

 

 

3:查看现在使用的内核

        uname -a
清理boot分区02
4:清理不用的内核:
sudo apt-get purge linux-image-3.13.0-24-generic  (内核名称)
sudo apt-get purge linux-image-3.13.0-32-generic
sudo apt-get purge linux-image-3.13.0-34-generic
sudo apt-get purge linux-image-3.13.0-35-generic
sudo apt-get purge linux-image-3.13.0-36-generic.
.
.
把那些不用的内核卸载掉一点,每个包大概都有190mb左右(注意,正在使用的内核不要卸载)
清理boot分区03
5:清理/usr/src目录,删除你已经卸载的内核目录 (这步其实和/boot分区没啥关系,不过一样删么,删干净点)
清理boot分区03
6:再用 dh -h 看看boot 分区,清理掉了66%,现在只占用30%了: