apt
Ubuntu 包依赖与变更管理
· ☕ 3 分钟
1. 查看包依赖 1.1 正向依赖 依赖哪些包 列出依赖 1 apt-cache depends nginx 查看已安装的依赖 1 apt-cache depends --installed nginx 查看详细依赖 1 2 apt show nginx dpkg -s nginx | grep -E '^(Package|Version|Depends|Pre-Depends|Recommends|Suggests|Conflicts|Breaks|Replaces):' 1.2 反向依赖 谁依赖这个包 列出所有可能依赖该包的包 1 apt-cache rdepends golang-github-containers-common 只看已安装的反向依赖 1 apt-cache rdepends --installed golang-github-containers-common 解释为什么装了某包 1 aptitude why golang-github-containers-common 解释为什么没装或不能