根据man apt,
list (work-in-progress)
list is somewhat similar to dpkg-query --list in that it can display a
list of packages satisfying certain criteria. It supports glob(7)
patterns for matching package names as well as options to list
installed (--installed), upgradeable (--upgradeable) or all
available (--all-versions) versions.
Run Code Online (Sandbox Code Playgroud)
但是,至少在两种情况下hunspell(有关输出,请参阅https://askubuntu.com/a/1036619/248158libreoffice )和,该apt list --all-versions列表要长得多:
apt list --all-versions | grep -E "^hunspell"
apt list --all-versions | grep -E "^libreoffice"
Run Code Online (Sandbox Code Playgroud)
导致点击次数远多于
dpkg -l hunspell*
dpkg -l libreoffice*
Run Code Online (Sandbox Code Playgroud)
(dpkg-query --list给出与 相同的输出dpkg -l。)
dpkg只能提供有关它所知道的信息,这仅限于dpkg应用了某些操作的包和版本。
apt另一方面,它拥有更多的信息 - 它包括从存储库获取的包列表中的所有内容。显然,大多数可用的软件包和版本不太可能dpkg完成操作,因此当然, 的输出dpkg-query不包括这些,因此是有限的。
| 归档时间: |
|
| 查看次数: |
4308 次 |
| 最近记录: |