如何停止列出大量标记:和以下 dep:条目的 apt-get 操作

如何停止列出大量标记:和以下 dep:条目的 apt-get 操作

当我运行 apt-get install|remove 操作时,输出会达到一百行或更多行 Marking: 或 Following dep: 一堆不相关的包。

以下是部分输出的示例:

Marking: firefox-esr-l10n-en-gb:amd64 52.0esr-16.04.1
Marking: filezilla:amd64 3.15.0.2-1ubuntu1
Marking: kde-spectacle:amd64 17.04.0-0neon+16.04+build8
Marking: openoffice.org-hyphenation:amd64 0.9
Following dep: openoffice.org-hyphenation:amd64 Depends on openoffice.org-updatedicts [ amd64 ] < none ->  > ( none ), provided by dictionaries-common:amd64 1.26.3 (1/1)
Marking: pcmciautils:amd64 018-8
Marking: python-pam:amd64 0.4.2-13.2ubuntu2
Marking: libaudio2:i386 1.9.4-4
Following dep: libaudio2:i386 PreDepends on multiarch-support [ i386 ] < none -> 2.23-0ubuntu7 > ( libs ), provided by multiarch-support:amd64 2.23-0ubuntu7 (1/1)
Marking: socat:amd64 1.7.3.1-1
Marking: libdirectfb-extra:i386 1.2.10.0-5.1
Following dep: libdirectfb-extra:i386 PreDepends on multiarch-support [ i386 ] < none -> 2.23-0ubuntu7 > ( libs ), provided by multiarch-support:amd64 2.23-0ubuntu7 (1/1)

我认为这只是 apt 中的一个详细程度设置,但我一直没能找到它——有人能帮我把它关掉吗?

答案1

这似乎是个Debug::pkgAutoRemove选择。来自man apt.conf

Debug::pkgAutoRemove
    Log events related to the automatically-installed status of
    packages and to the removal of unused packages.

虽然上述描述不是完全有帮助,但你可以通过查看apt源代码来确认 - 具体来说apt-1.3.5/apt-pkg/depcache.cc

   bool const debug_autoremove = _config->FindB("Debug::pkgAutoRemove", false);
   if(debug_autoremove)
      std::clog << "Marking: " << Pkg.FullName() << " " << Ver.VerStr() << std::endl;

您应该能够通过查找和修改文件中的设置来将其关闭/etc/apt.conf/etc/apt.conf.d/xxx或者在命令行上使用-o选项例如

sudo apt-get -oDebug::pkgAutoRemove=false install foo

相关内容