Ubuntu技巧之清理系統中無用的軟件包
http://www.linuxidc.com/Linux/2008-01/10573.htm
如何清理Ubuntu系統中軟件包
如果你頻繁的在你的系統中安裝/卸載,那麼不時的清理一下你的系統是十分必要的。
在Ubuntu終端中執行如下命令:
sudo apt-get autoremove
屏幕輸出是這個樣子的:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
libcommoncpp2-1.5.3-0
The following packages will be REMOVED
libcommoncpp2-1.5.3-0
0 upgraded, 0 newly installed, 1 to remove and 29 not upgraded.
Need to get 0B of archives.
After unpacking 688kB disk space will be freed.
Do you want to continue [Y/n]?
輸入“Y”就可以刪除這些包。
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ubuntu 14.04下更新源方法
1.備份源
1
# cp /etc/apt/source.list /etc/apt/source.list.backup
2.編輯源
1
# vim /etc/apt/source.list
3.替換合適的源 (可以從後面選擇)
4.刷新
1
# apt-get update
部分源地址
阿裡雲服務器(杭州電信/網通雙網)
debhttp://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
debhttp://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
debhttp://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
debhttp://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
debhttp://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
網易163服務器(廣州電信/網通雙網)
debhttp://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
debhttp://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
debhttp://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
debhttp://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
debhttp://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
搜狐服務器(山東網通)
debhttp://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
debhttp://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
debhttp://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
debhttp://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
debhttp://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-srchttp://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb-srchttp://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-srchttp://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-srchttp://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-srchttp://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
10.04 將源中的trusty替換為 lucid 即可
12.04 將源中的trusty替換為 precise 即可
--------------------------------------------------------------------------------------------------------------------------------------
sudo cp /etc/apt/source.list /etc/apt/source_backup.list # 保存之前的源
使用vi 或gedit等工具打開 /etc/apt/source.list ,往其中增加新的源:
國內比較快的是網易163和搜狐的鏡像。比如如下的source列表:
debhttp://mirrors.163.com/ubuntu/ intrepid main restricted universe multiverse
debhttp://mirrors.163.com/ubuntu/ intrepid-security main restricted universe multiverse
debhttp://mirrors.163.com/ubuntu/ intrepid-updates main restricted universe multiverse
debhttp://mirrors.163.com/ubuntu/ intrepid-proposed main restricted universe multiverse
debhttp://mirrors.163.com/ubuntu/ intrepid-backports main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/ intrepid main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/ intrepid-security main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/ intrepid-proposed main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/ intrepid-backports main restricted universe multiverse
debhttp://ubuntu.cn99.com/ubuntu/ intrepid main restricted universe multiverse
debhttp://ubuntu.cn99.com/ubuntu/ intrepid-security main restricted universe multiverse
debhttp://ubuntu.cn99.com/ubuntu/ intrepid-updates main restricted universe multiverse
debhttp://ubuntu.cn99.com/ubuntu/ intrepid-proposed main restricted universe multiverse
debhttp://ubuntu.cn99.com/ubuntu/ intrepid-backports main restricted universe multiverse
deb-srchttp://ubuntu.cn99.com/ubuntu/ intrepid main restricted universe multiverse
deb-srchttp://ubuntu.cn99.com/ubuntu/ intrepid-security main restricted universe multiverse
deb-srchttp://ubuntu.cn99.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb-srchttp://ubuntu.cn99.com/ubuntu/ intrepid-proposed main restricted universe multiverse
deb-srchttp://ubuntu.cn99.com/ubuntu/ intrepid-backports main restricted universe multiverse
#debhttp://mirror.lupaworld.com/ubuntu gutsy main restricted universe multiverse
#debhttp://mirror.lupaworld.com/ubuntu gutsy-security main restricted universe multiverse
#debhttp://mirror.lupaworld.com/ubuntu gutsy-updates main restricted universe multiverse
#debhttp://mirror.lupaworld.com/ubuntu gutsy-backports main restricted universe multiverse
#deb-srchttp://mirror.lupaworld.com/ubuntu gutsy main restricted universe multiverse
#deb-srchttp://mirror.lupaworld.com/ubuntu gutsy-security main restricted universe multiverse
#deb-srchttp://mirror.lupaworld.com/ubuntu gutsy-updates main restricted universe multiverse
#deb-srchttp://mirror.lupaworld.com/ubuntu gutsy-backports main restricted universe multiverse
#debhttp://tw.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
#debhttp://tw.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
#debhttp://tw.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
#debhttp://tw.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
#debhttp://tw.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse
#deb-srchttp://tw.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
#deb-srchttp://tw.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
#deb-srchttp://tw.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
#deb-srchttp://tw.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
#deb-srchttp://tw.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse
debhttp://ubuntu.uestc.edu.cn/ubuntu/ intrepid main restricted universe multiverse
debhttp://ubuntu.uestc.edu.cn/ubuntu/ intrepid-backports main restricted universe multiverse
debhttp://ubuntu.uestc.edu.cn/ubuntu/ intrepid-proposed main restricted universe multiverse
debhttp://ubuntu.uestc.edu.cn/ubuntu/ intrepid-security main restricted universe multiverse
debhttp://ubuntu.uestc.edu.cn/ubuntu/ hardy-updates main restricted universe multiverse
deb-srchttp://ubuntu.uestc.edu.cn/ubuntu/ intrepid main restricted universe multiverse
deb-srchttp://ubuntu.uestc.edu.cn/ubuntu/ intrepid-backports main restricted universe multiverse
deb-srchttp://ubuntu.uestc.edu.cn/ubuntu/ intrepid-proposed main restricted universe multiverse
deb-srchttp://ubuntu.uestc.edu.cn/ubuntu/ intrepid-security main restricted universe multiverse
deb-srchttp://ubuntu.uestc.edu.cn/ubuntu/ intrepid-updates main restricted universe multiverse
debhttp://archive.ubuntu.org.cn/ubuntu-cn/ feisty main restricted universe multiverse
保存了source.list 之後,使用 sudo apt-get update 更新源,之後再遇到apt-get install 或者 upgrade的時候就會快很多,而不會就僅僅從歐洲官方的源下載了。