DPKG-QUERY(8)

NAME
dpkg-query - a tool to query the dpkg database

SYNOPSIS
dpkg-query

DESCRIPTION
dpkg-query is a tool to show information about packages listed in the dpkg database.

COMMANDS

-l | --list package-name-pattern ...
    List packages matching given pattern. If no package-name-pattern is given, list all packages in /var/lib/dpkg/status. Normal shell wildchars are allowed in package-name-pattern. Please note you will probably have to quote package-name-pattern to prevent the shell from performing filename expansion. For example this will list all package names starting with “libc5”:
      dpkg-query -l 'libc5*'

-W | --show package-name-pattern ...
    Just like the --list option this will list all packages matching the given pattern. However the output can be customized using the --showformat option.

-s | --status package-name ...
    Report status of specified package. This just displays the entry in the installed package status database.

-L | --listfiles package ...
    List files installed to your system from package. However, note that files created by package-specific installation-scripts are not listed.

-S | --search filename-search-pattern ...
    Search for a filename from installed packages. All standard shell wildchars can be used in the pattern. This command will not list extra files created by maintainer scripts, nor will it list alternatives.

-p |--print-avail package
    Display details about package, as found in /var/lib/dpkg/available.

--licence | --license
    Display licence and copyright information.

--version
    Display version information.

OPTIONS

--admindir=dir
    Change the location of the dpkg database. The default location is /var/lib/dpkg.

--showformat=format
    This option is used to specify the format of the output --show will produce. The format is a string that will be output for each package listed. It can include the standard escape sequences \n (newline), \r (carriage return) or \\ (plain backslash). Package information can be included by inserting variable references to package fields using the ${var[;width]} syntax. Fields are printed be right-aligned unless the width is negative in which case left alignment will be used.

ENVIRONMENT

COLUMNS
    This setting influences the output of the --list option by changing the width of its output.

AUTHOR
Copyright 2001 Wichert Akkerman <wakkerma@debian.org> (mailto:wakkerma@debian.org)

This is free software; see the GNU General Public Licence version 2 or later for copying conditions. There is NO warranty.

SEE ALSO
dpkg(8)