能否从 apt-get 获取“孤立”库包列表?即在需要它们的包卸载后,由于某种原因而残留的库。
我意识到,一般来说这些库是与主包一起处理的,但我遇到了一些孤立包的例子,所以我很好奇 apt-get 是否有能力告诉我更多信息。
答案1
安装deborphan
并检查orphaner(8)
实用程序。
$ apt-cache show deborphan
Package: deborphan
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 500
Maintainer: deborphan devel team
Architecture: amd64
Version: 1.7.28.8
Depends: libc6 (>= 2.7)
Recommends: apt, dialog, gettext-base
Conffiles:
/etc/bash_completion.d/deborphan e8190ae92bb2f343c2d87f9eb2cf9f0a
Description: program that can find unused packages, e.g. libraries
deborphan finds "orphaned" packages on your system. It determines which
packages have no other packages depending on their installation and shows
you a list of these packages. It is most useful when finding libraries,
but it can be used on packages in all sections.
.
This package also includes orphaner, a text menu frontend to deborphan.
Please install the recommended packages dialog, gettext-base and apt when
you want a working and fully featured orphaner.
如果启动时没有参数,它将显示一个 curses 界面,其中显示孤立的包。您可以试运行测试或清除这些包。