# dpkg-query

## Man Page

{% embed url="<https://linux.die.net/man/1/dpkg-query>" %}

## dpkg-query --help

```
Usage: dpkg-query [<option> ...] <command>

Commands:
  -s, --status [<package>...]      Display package status details.
  -p, --print-avail [<package>...] Display available version details.
  -L, --listfiles <package>...     List files 'owned' by package(s).
  -l, --list [<pattern>...]        List packages concisely.
  -W, --show [<pattern>...]        Show information on package(s).
  -S, --search <pattern>...        Find package(s) owning file(s).
      --control-list <package>     Print the package control file list.
      --control-show <package> <file>
                                   Show the package control file.
  -c, --control-path <package> [<file>]
                                   Print path for package control file.

  -?, --help                       Show this help message.
      --version                    Show the version.

Options:
  --admindir=<directory>           Use <directory> instead of /var/lib/dpkg.
  --load-avail                     Use available file on --show and --list.
  -f|--showformat=<format>         Use alternative format for --show.

Format syntax:
  A format is a string that will be output for each package. The format
  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 will be right-aligned unless the width is negative in which
  case left alignment will be used.
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://strangebutohwell.gitbook.io/knowledge/linux/package-management/dpkg-query.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
