通过apt或apt-get查找使用给定程序安装的其他软件包?
我不知道另一种方法 – 如果已安装该程序(不像安装像debfoster
这样的专门程序后安装的程序) – 除非我保存了apt
或apt-get
给出的消息:例如Thunar它说:
The following additional packages will be installed: exo-utils libexo-1-0 libexo-common libexo-helpers libgarcon-1-0 libgarcon-common libthunarx-2-0 libtumbler-1-0 libwnck-common libwnck22 libxfce4ui-1-0 libxfce4ui-common libxfce4util-bin libxfce4util-common libxfce4util7 libxfconf-0-2 thunar-data thunar-volman tumbler tumbler-common xfce4-panel xfconf
如果没有像debfoster
那样安装单独的工具,Ubuntu中是否已经提供此类信息? 所以, 我不是在问这些工具 (在这里回答),而是关于通过apt或apt-get查看已安装程序的软件包的方法。
如果在此期间没有安装任何共享任何相同依赖项的东西,那么一种方法是模拟删除包并记下自动安装的包:
例如
$ sudo apt-get remove --dry-run thunar Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: exo-utils libexo-1-0 libexo-common libexo-helpers libgarcon-1-0 libgarcon-common libthunarx-2-0 libtumbler-1-0 libwnck-common libwnck22 libxfce4ui-1-0 libxfce4ui-common libxfce4util-bin libxfce4util-common libxfce4util7 libxfconf-0-2 thunar-data tumbler tumbler-common xfce4-panel xfconf Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: thunar thunar-volman 0 upgraded, 0 newly installed, 2 to remove and 123 not upgraded. Remv thunar-volman [0.8.1-2] Remv thunar [1.6.11-0ubuntu0.16.04.2]
注意:如果还有其他待处理的autoremovals(通常,这些是自动安全更新产生的内核包),它们也会显示在输出中。 为了只查看您感兴趣的特定包的自动安装包,首先运行sudo apt-get autoremove
以便apt
从“干净”状态开始。
apt-cache rdepends thunar
为您提供程序的依赖项..
或者查看/var/log/apt/history.log
,它会为您提供所需的确切列表信息。
参考: 如何列出依赖包(反向依赖)?
apt-rdepends
将获取包名称并告诉您包的依赖包,当您apt-get install
时,应该安装或满足这些包。