列出ubuntu软件管理工具apt的一些用法(自由总结)

apt install 安装软件包


apt remove 移除软件包


apt purge 移除软件包及配置文件


apt update 刷新存储库索引


apt search 搜索应用程序

apt show 显示安装细节


apt list 列出包含条件的包(已安装,可升级等)


apt edit-sources 编辑source源件


apt-cache madison nginx 查看仓库中软件包有哪些版本可以安装


apt install nginx=1.14.0-0ubuntu1.6 安装软件包的时候指定安装具体的版本


查看文件来自于哪个包,类似redhat中的yum provides <filename>
apt-file search 'string' 默认是包含此字符串的文件
apt-file search -x '正则表达式'


显示系统安装包的统计信息,可以统计已经安装包的数量,大小,占用空间等
apt-cache stats


显示xxx包的信息,可以看到某个包的源、版本等信息
apt-cache show xxx 更详细
apt show xxx


查询软件xxx依赖哪些包
apt depends xxx
apt-cache depends xxx

posted @ 2022-03-25 10:30  海月如希  阅读(145)  评论(0)    收藏  举报