Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

Name

dpkg-query

Synopsis

dpkg-query [option] command

Display information about packages listed in the dpkg database. You can also use dpkg-query as a backend for dpkg, instead of calling dpkg-query directly.

Commands

--help

Print help information and exit.

-l [patterns], --list [patterns]

List packages whose names match any of the specified patterns. With no pattern specified, list all packages in /var/lib/dpkg/status. The pattern may need to be in quotes to avoid expansion by the shell.

-L packages, --listfiles packages

List files installed on your system from each of the specified packages. This command does not list files created by package-specific installation scripts.

--license, --licence

Print the license information and exit.

-p package, --print-avail package

Display details for the specified package, as found in /var/lib/dpkg/available.

-s package, --status package

Report on the status of the specified package.

-S patterns, --search patterns

Search the installed packages for filenames matching one of the specified patterns. At least one pattern must be specified.

-W [patterns], --show [patterns]

Like -l, but the output can be customized with the --showformat option.

--version

Print version information and exit.

Options

--admindir=dir

Use dir as the location of the dpkg database. The default is /var/lib/dpkg.

-f format, --showformat=format

Specify the output format for -W/--show. The format can include the standard escape sequences \n (newline), \r (carriage return), or \\ (backslash). Specify package ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page