Provided by: apt_1.9.4_amd64 bug


       apt-patterns - Syntax and semantics of apt search patterns


       Starting with version 2.0, APT provides support for patterns, which can be used to query
       the apt cache for packages.


       These patterns provide the basic means to combine other patterns into more complex
       expressions, as well as ?true and ?false patterns.

       ?and(PATTERN, PATTERN, ...)
           Selects objects where all specified patterns match.

           Selects nothing.

           Selects objects where PATTERN does not match.

       ?or(PATTERN, PATTERN, ...)
           Selects objects where at least one of the specified patterns match.

           Selects all objects.


       These patterns select specific packages.

           Selects packages matching the specified architecture, which may contain wildcards
           using any.

           Selects packages that were installed automatically.

           Selects packages that have broken dependencies.

           Selects packages that are not fully installed, but have solely residual configuration
           files left.

           Selects packages that have Essential: yes set in their control file.

           Selects packages with the exact specified name.

           Selects packages that can be removed automatically.

           Selects packages that are currently installed.

           Selects packages where the name matches the given regular expression.

           Selects packages that no longer exist in repositories.

           Selects packages that can be upgraded (have a newer candidate).

           Selects all virtual packages; that is packages without a version. These exist when
           they are referenced somewhere in the archive, for example because something depends on
           that name.


       apt remove ?garbage
           Remove all packages that are automatically installed and no longer needed - same as
           apt autoremove

       apt purge ?config-files
           Purge all packages that only have configuration files left


       Patterns in apt are heavily inspired by patterns in aptitude, but with some tweaks:

       ·   Only long forms — the ones starting with ? — are supported

       ·   Syntax is uniform: If there is an opening parenthesis after a term, it is always
           assumed to be the beginning of an argument list.

           In aptitude, a syntactic form "?foo(bar)" could mean "?and(?foo,bar)" if foo does not
           take an argument. In APT, this will cause an error.

       ·   Not all patterns are supported.

       ·   Some additional patterns are available, for example, for finding gstreamer codecs.

       ·   Escaping terms with ~ is not supported.

       ·   A trailing comma is allowed in argument lists


       apt-get(8), apt(8)


       APT bug page[1]. If you wish to report a bug in APT, please see
       /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.


       APT was written by the APT team <>.


       Jason Gunthorpe

       APT team


        1. APT bug page