Debian – How to search Debian packages by description

aptdebianpackage-managementsearch

I wanted to find packages related to transmission, a BitTorrent client but couldn't find how to search package descriptions.

Why do this?

In certain cases, package names are not obvious; for instance a remote controll application for Transmission can be named transmission-remote-gtk (an older one) or transgui (more recent). The description of both packages includes transmission though. It would be practical to the non-aware user that I am, who expects other packages to have non-obvious names if there was a way to lookup package description instead.

On my system aptitude search looks up into package names only. On the other hand there's eix -S under Gentoo.

So how would I search packages by description under Debian? (I guess I can browse all available packages and grep the results. I expect a more appropriate method, of course hence my question.)


EDIT: Listing results by built-in commands aptitude and apt-cache

As suggested by Marco and MatthewRock there's aptitude search '~d<string>' and apt-get search. However the two appear to also include results that have nothing to do with the search string (on my system at least):

# aptitude search '~dtransmission'
p   atlc                          - calculateur de lignes de transmission arbitraires                  
p   atlc:i386                     - calculateur de lignes de transmission arbitraires                  
p   atlc-examples                 - Exemples pour le calculateur de transmission de ligne arbitraire   
p   between                       - game about consciousness and isolation  
p   between:i386                  - game about consciousness and isolation  
p   boinc-app-seti                - SETI@home application for the BOINC client                         
p   boinc-app-seti:i386           - SETI@home application for the BOINC client                         
p   boinc-app-seti-dbg            - debug symbols for SETI@home             
p   boinc-app-seti-dbg:i386       - debug symbols for SETI@home             
p   boinc-app-seti-graphics       - SETI@home application for the BOINC client (with graphics)         
p   boinc-app-seti-graphics:i386  - SETI@home application for the BOINC client (with graphics)         
p   ca-cacert                     - CAcert.org root certificates            
p   cstream                       - general-purpose stream-handling tool similar to dd                 
p   cstream:i386                  - general-purpose stream-handling tool similar to dd                 
p   cycle                         - programme de calendrier pour femme      
...

with aptitude or

# apt-cache search transmission
between - game about consciousness and isolation
boinc-app-seti - SETI@home application for the BOINC client
boinc-app-seti-dbg - debug symbols for SETI@home
boinc-app-seti-graphics - SETI@home application for the BOINC client (with graphics)
ca-cacert - CAcert.org root certificates
libcollada2gltfconvert-dev - COLLDADA to glTF conversion library -- development
cstream - general-purpose stream-handling tool similar to dd
freedv - Software Defined Radio (SDR)
glfer - program for reception and transmission of QRSS/DFCW signals
libgmetric4j-java - gmetric4j Ganglia metric transmission API
libgnuradio-noaa3.7.5 - gnuradio noaa satellite signals functions
hamfax - Receive/send radio facsimile transmissions with Soundcard/PTC-II
hylafax-server - Flexible client/server fax software - server daemons
hylafax-server-dbg - Debug symbols for the hylafax server
libijs-dev - IJS raster image transport protocol: development files
libijs-doc - IJS raster image transport protocol: documentation
ike-scan - discover and fingerprint IKE hosts (IPsec VPN Servers)
ion - NASA implementation of Delay-Tolerant Networking (DTN)
ion-doc - Interplanetary Overlay Network - examples and documentation
libion-dev - NASA implementation of Delay-Tolerant Networking (DTN) - development files
...

with apt-cache. The above even includes results which do not match "transmission" nor "trans". Weird indeed.

Best Answer

Use apt-cache:

apt-cache search packagename

This shows packages that apt considers related(many of them don't even include name of packge in both description and name).

If you only want packages that contain packagename in description or name, pipe with grep:

apt-cache search packagename | grep 'packagename'

BUT! Other tools for the rescue:

axi-cache search packagename

You can read more about axi-cache here. axi-cache sorts scores by relevance and shows you percentage of match, so it's more likely to give you the output you want. Looks like my new replacement for apt-cache.

axi-cache is part of apt-xapian package

Related Question