According to 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.
But, in at least two cases, hunspell
(see https://askubuntu.com/a/1036619/248158 for the output) and libreoffice
, the apt list --all-versions
list is far longer:
apt list --all-versions | grep -E "^hunspell"
apt list --all-versions | grep -E "^libreoffice"
result in far more hits than
dpkg -l hunspell*
dpkg -l libreoffice*
(dpkg-query --list
gives the same output as dpkg -l
.)