天使漫步IT工作室天使漫步IT工作室

Ubuntu系统瘦身(清理)命令大全


Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/u11u.com/usr/themes/wq/functions.php on line 110

Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/u11u.com/usr/themes/wq/functions.php on line 116

一、删除缓存

1,非常有用的清理命令:

sudo apt-get autoclean                清理旧版本的软件缓存

sudo apt-get clean                    清理所有软件缓存

sudo apt-get autoremove             删除系统不再使用的孤立软件

sudo apt-get update (更新)

sudo apt-get upgrade (升级)

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

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

ls ~/.opera/cache4

ls ~/.mozilla/firefox/*.default/Cache

3,清理Linux下孤立的包:

终端命令下我们可以用:

sudo apt-get install deborphan -y

4,卸载:tracker

这个东西一般我只要安装ubuntu就会第一删掉tracker 他不仅会产生大量的cache文件而且还会影响开机速度。所以在新得利里面删掉就行。

包管理的临时文件目录:

包在:/var/cache/apt/archives

没有下载完的在:/var/cache/apt/archives/partial

二、删除软件

ubuntu软件的删除一般用“ubuntu软件中心”或“新立得”就能搞定,但有时用命令似乎更快更好~~

sudo apt-get remove --purge 软件名

sudo apt-get autoremove                                                        删除系统不再使用的孤立软件

sudo apt-get autoclean                                                            清理旧版本的软件缓存

dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P              清除残余的配置文件

保证干净。

三、删除多余内核

1,首先要使用这个命令查看当前Ubuntu系统使用的内核

uname -a

2,再查看所有内核

dpkg --get-selections|grep linux

3,最后小心翼翼地删除吧

sudo apt-get remove linux-image-2.6.32-22-generic

ps:linux-image-xxxxxx-generic    就是要删除的内核版本

还有

linux-headers-xxxxxx

linux-headers-xxxxxx-generic    总之中间有“xxxxxx”那段的旧内核都能删,注意一般选内核号较小的删。

补充:最高版本的linux-image-xxxxxx-generic建议不要删。

本站原创,欢迎转载,转载敬请标明出处:天使漫步IT工作室 » Ubuntu系统瘦身(清理)命令大全
添加新评论


Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /www/wwwroot/u11u.com/usr/themes/wq/comments.php on line 38