我以为apt list用于已安装的软件包,但看起来它需要--installed标志。那么它和apt search之间有什么区别呢?前者只查找可用包的本地缓存吗?
发布于 2022-01-11 01:34:38
这就是手册有用的地方:
apt search {criteria}
search can be used to search for the given regex(7) term(s) in the list of available
packages and display matches. This can e.g. be useful if you are looking for packages
having a specific feature. If you are looking for a package including a specific file
try apt-file.apt list {criteria}
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.使用apt search {criteria},您可以找到符合您在名称、描述或其他元数据中设置的标准的包。
但是,apt list {criteria}允许您根据包的名称以及它们是已经安装、当前可升级,还是仅仅存在(在包列表缓存的本地副本中)列出包。
https://askubuntu.com/questions/1386430
复制相似问题