Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Some (most?) packages in Debian, have tags. For example:

=# apt-cache show squirrelmail | perl -lne 'print if /^Tag:/.../^\S/'
Tag: implemented-in::php, interface::web, mail::imap, mail::smtp,
 mail::user-agent, network::server, protocol::http, protocol::imap,
 protocol::smtp, role::program, scope::application, use::browsing,
 use::editing, use::searching, use::transmission, use::viewing,
 web::TODO, web::application, works-with::mail
Section: web

But, I can't find a way, to list all packages with given tag. Is it possible?

share|improve this question
up vote 4 down vote accepted

You probably want to take a look at all the documentation surrounding Debtags. It's... not as simple as you might think. No, I don't know why, either.

share|improve this answer
Just a word of comment - I picked this answer, because debtags seems to do what I need (debtags search "mail::user-agent && interface::web") while axi-cache seems to have problems when searching for multiple tags at once. – user13185 Jul 8 '12 at 19:04

use axi-cache from the apt-xapian-index package. you can, for example do axi-cache search --all protocol::smtp. The tab-completion for axi-cache is extremely advanced, so hit tab often. for example, i-cache search --all protocol::smtp <tab><tab> will show you what other tags you might want based on the fact that you already specified the first.

share|improve this answer

I wonder why peoply doesn't answer:

aptitude search '?tag(protocol::dns)'

aptitude search allow complex search queries with probes on different package description fields and logical operators:

aptitude search '?tag(game::strategy) ?installed'
aptitude search '?tag(protocol::dns) !?installed'

Refer to Search term reference in Aptitude User's Manual from aptitude-doc-en package (/usr/share/doc/aptitude/html/en/index.html).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.