Em man apt-cache
:
pkgnames [prefix]
This command prints the name of each package APT knows. The
optional argument is a prefix match to filter the name list.
[...]
Note that a package which APT knows of is not necessarily available
to download, installable or installed, e.g. virtual packages are
also listed in the generated list.
Se você quiser procurar pacotes instalados, uma forma é usar apt list
:
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.
Então:
apt list --installed 'virtualbox*'