Which shell command can find all packages that provide a specific complete virtual package?

As the name implies, I want to get a list of all the packages that provide a specific virtual package. A way to do this would be to write a shell script that parses all the output

apt-cache search -f .* 

and displays all packages with a virtual package in the "Provisioning" section. The problem with this approach is that it takes a very long time to complete. I suppose there should be a simple team that does this in an efficient way, but which I could not find.

+6
linux shell ubuntu package aptitude
source share
2 answers

If you have aptitude installed, it provides many templates that you can use to search.

In particular, to search for packages that provide a given virtual package name, you can use this:

 $ aptitude search '?provides(pattern)' 

where the template can be set to the name of the virtual package you are looking for.

For example:

 $ aptitude search -F %p '?provides(mail-reader)' balsa bsd-mailx claws-mail cone emacs emacs23 emacs23-lucid emacs23-nox evolution gnus im jed kmail kmail-mobile mailutils mailutils-mh mew mew-beta mew-beta-bin mew-bin mutt nmh opera opera-next seamonkey-mailnews sylpheed thunderbird tkrat vm wl wl-beta xemacs21-mule xemacs21-mule-canna-wnn xemacs21-nomule xjed xul-ext-lightning 
+8
source share

See if dpkg-query meets your needs.

+1
source share

All Articles