ubuntu apt 命令相关

 

1.查看可用的package version信息
apt-cache policy <package name>

 

2.安装指定版本package

sudo apt-get install firefox=<VERSION>

3. 清除不再需要的依赖包

apt autoremove

https://askubuntu.com/questions/527410/what-is-the-advantage-of-using-sudo-apt-get-autoremove-over-a-cleaner-app

4.解决 sudo apt-get update 时出现错误

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-amd64/Packages  Hash Sum mismatch

...

E: Some index files failed to download. They have been ignored, or old ones used instead.

解决方案:

sudo rm -vf /var/lib/apt/lists/*

sudo apt-get clean

sudo apt-get update

https://askubuntu.com/questions/553765/failed-to-fetch-update-on-ubuntu-14-04-lts-trusty-tahr 

 

posted @ 2019-02-26 19:58  SEC.VIP_网络安全服务  阅读(116)  评论(0编辑  收藏  举报