ubuntu安装和卸载软件命令

安装软件

apt-get install softname1 softname2 softname3……

卸载软件

apt-get remove softname1 softname2 softname3……

卸载并清除配置

apt-get remove --purge softname1

更新软件信息数据库

 sudo apt-get update

更新已安装的包

sudo apt-get upgrade

升级系统((注意:这命令慎用,容易GG))

sudo apt-get dist-upgrade

搜索软件包

apt-cache search softname1 softname2 softname3……

获取包的相关信息,如说明、大小、版本等

apt-cache show package

重新安装包

sudo apt-get install package --reinstall

修复安装(注意:这命令慎用,容易GG)

sudo apt-get -f install   

了解使用该包依赖那些包

apt-cache depends package

查看该包被哪些包依赖

apt-cache rdepends package

安装相关的编译环境

sudo apt-get build-dep package 

下载该包的源代码

apt-get source package

清理无用的包

sudo apt-get clean && sudo apt-get autoclean

检查是否有损坏的依赖

sudo apt-get check

Deb软件包相关安装与卸载

安装deb软件包

dpkg -i xxx.deb

删除软件包

 dpkg -r xxx.deb

连同配置文件一起删除

dpkg -r --purge xxx.deb

查看软件包信息

 dpkg -info xxx.deb

查看文件拷贝详情

dpkg -L xxx.deb

查看系统中已安装软件包信息

dpkg -l

重新配置软件包

dpkg-reconfigure xxx

猜你喜欢

转载自blog.csdn.net/weixin_40522162/article/details/80303008