美文网首页
\boot没有空间 + ubuntu清理

\boot没有空间 + ubuntu清理

作者: NooneIam | 来源:发表于2017-09-05 17:59 被阅读0次

1,

sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove

这三个命令主要清理升级缓存以及无用包的

2,清理opera/firefox的缓存文件:

ls ~/.opera/cache4|xargs rm -f
ls ~/.mozilla/firefox/*.default/Cache|xargs rm -f

3,清理Linux下孤立的包:
图形界面下我们可以用:gtkorphan
sudo apt-get install gtkorphan -y
终端命令下我们可以用:deborphan
sudo apt-get install deborphan -y

4,删除多余的内核:
打开终端敲命令:dpkg --get-selections|grep linux
有image的就是内核文件;
删除老的内核文件:
sudo apt-get remove 内核文件名 (例如:linux-image-2.6.27-2-generic)
内核删除,释放空间了,应该能释放130-140M空间。
最后看看当前内核:uname -a

5,清空某个目录下所有log日志:

for i in `ls *.log*`
do
cat /dev/null >$i
done

相关文章

网友评论

      本文标题:\boot没有空间 + ubuntu清理

      本文链接:https://www.haomeiwen.com/subject/vlhpjxtx.html