我的印象是,pacman列出的“孤儿”包是已作为依赖项安装但不再需要的包。
但是,看看孤立的结果,我可以看到像Inkscape和ttf字体这样的软件包,它们显然不符合这种描述。所以现在我不确定我是否应该删除它们。有人能解释一下什么是“孤儿”包吗?
pamac中的孤儿软件包列表:

来自pacman -Qdtq的相同列表:

发布于 2017-06-11 20:48:48
pamac将孤儿定义为作为另一个包的要求安装的包,但不再是任何其他包(来源)所需要的。
没有查看列表中的所有包,但至少inkscape和ttf-信使-素数、ttf-启发式和ttf-impallari-cantora都是其他包可能需要的包,这意味着您曾经安装了一些其他软件包,并删除了这些包。
发布于 2017-06-11 21:38:32
man pacman解释了孤儿的概念:
-d,--deps 限制或筛选作为依赖项安装的包的输出。可以将此选项与-t组合起来,以列出真正的孤儿--安装为依赖关系但任何已安装的包不再需要的包。
pacman打印的所有包看起来都是另一个包的依赖项,因此可以安全地删除。如果您不确定,可以在包上运行pacman -Qi $package来查看它提供了什么或需要什么。
发布于 2019-01-04 18:01:19
为了方便起见,我在~/.bash_aliases中提供了一个可以让我轻松清理孤立包的工具:
# Remove orphaned packages.
# Needs single quotes, otherwise the newlines that "pacman -Qqdt" outputs
# cause trouble.
# The parentheses create a subshell meaning "set -x" that prints the executed
# Bash commands is unset when the subshell exits at the end of the command.
# Arguments to "pacman -Q":
# -d restrict output to packages installed as dependencies
# -t list packages that are no longer required by any installed package
# -q suppress version numbers of packages (this would confuse pacman -R)
alias cleanup_packages='(set -x; sudo pacman -Rs $(pacman -Qdtq))'https://unix.stackexchange.com/questions/370530
复制相似问题