所有 apt 命令行命令和选项是什么?

8 command-line apt documentation

我知道他们认为他们很有帮助,但实际上他们在apt --help和 联机帮助页中恰恰相反:

很像 apt 本身,它的联机帮助页旨在作为最终用户界面,因此只提到最常用的命令和选项,部分是为了不在多个地方重复信息,部分是为了避免让读者不知所措的选项和细节。

所以基本上换句话说,他们只列出了一些命令和选项,并且让您不知道如何找出其余的命令和选项,如果我要使用这个工具,这将非常无用。

那么,他们认为不提供“有用”的所有命令和选项是什么,它们的详细信息和用法是什么,如果他们没有正式提供这些信息,我如何才能及时了解这些信息?或者也许现在已经改变并且它们被列在某处?

我正在使用 GNOME 3.20 运行 Ubuntu GNOME 16.04。

Zan*_*nna 6

请改进这个 wiki 并添加您最喜欢的 apt 命令:)


apt changelog PACKAGE_NAME
Run Code Online (Sandbox Code Playgroud)

上面的cmd。lesschangelogs.ubuntu.com 中提取的以相反日期顺序(最新的在前)格式的指定包的更改日志历史记录如何


apt full-upgrade
Run Code Online (Sandbox Code Playgroud)

(需要 root 权限)一个新名称apt-get dist-upgrade- 请参阅man apt-get

dist-upgrade 除了执行升级功能外,还智能处理新版本包的依赖变化;apt-get 有一个“智能”的冲突解决系统,它会在必要时尝试升级最重要的软件包,而牺牲不太重要的软件包。因此 dist-upgrade 命令可能会删除一些软件包。


apt search PACKAGE_NAME
Run Code Online (Sandbox Code Playgroud)

几乎apt-cache search与美化输出相同- 行距和彩色以便于阅读:

search 对给定的 POSIX 正则表达式模式的所有可用包列表执行全文搜索。它在包名和描述中搜索正则表达式的出现,并打印出包名和简短描述,包括虚拟包名。



Ant*_*lis 5

apt(8)手册页

SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS
   The apt(8) commandline is designed as an end-user tool and it may change
   behavior between versions. While it tries not to break backward
   compatibility this is not guaranteed either if a change seems beneficial
   for interactive use.

   All features of apt(8) are available in dedicated APT tools like apt-get(8)
   and apt-cache(8) as well.  apt(8) just changes the default value of some
   options (see apt.conf(5) and specifically the Binary scope). So you should
   prefer using these commands (potentially with some additional options
   enabled) in your scripts as they keep backward compatibility as much as
   possible.
Run Code Online (Sandbox Code Playgroud)

我对这意味着什么的理解apt是将与手册页中显示的选项和其他 apt 工具一起使用,例如apt-get(8)apt-cache(8)具有可供最终用户使用的附加选项和功能。