OS Manuals

/usr/bin/dpkg

The Debian Package Manager

From dpkg 1.23.11-r3 (os), captured 2026-11-05 by running dpkg --help (exit 0). permalink

Usage: dpkg [<option>...] <command>

Commands:
  -i, --install <archive-spec>
          Install the archives.
      --unpack <archive-spec>
          Unpack the archives.
      --configure <package-spec>
          Configure the packages.
      --triggers-only <package-spec>
          Process triggers for the packages.
  -r, --remove <package-spec>
          Remove the packages.
  -P, --purge <package-spec>
          Purge the packages.
  -V, --verify [<package>...]
          Verify the integrity of packages.
  -C, --audit [<package>...]
          Check for broken packages.
  -s, --status [<package>...]
          Show package status details.
  -l, --list [<pattern>...]
          List packages concisely.
  -L, --listfiles <package>...
          List files 'owned' by packages.
  -S, --search <pattern>...
          Find packages owning files.
      --get-selections [<pattern>...]
          Get list of selections to stdout.
      --set-selections
          Set package selections from stdin.
      --clear-selections
          Deselect every non-essential package.
  -p, --print-avail [<package>...]
          Show available package version details.
  -A, --record-avail <archive-spec>
          Record the archives in the available file.
      --update-avail [<Packages-file>]
          Replace available packages information.
      --merge-avail [<Packages-file>]
          Merge available package information.
      --clear-avail
          Erase existing available package information.
      --add-architecture <arch>
          Add <arch> to the list of architectures.
      --remove-architecture <arch>
          Remove <arch> from the list of architectures.
      --print-architecture
          Print native dpkg architecture.
      --print-foreign-architectures
          Print allowed foreign architectures.
      --validate-<thing> <string>
          Validate a <thing>'s <string>.
      --compare-versions <a> <op> <b>
          Compare version numbers (see below).
      --predep-package
          Print pre-dependencies to unpack.
      --assert-help
          Show help on assertions.
      --assert-<feature>
          Assert support for the specified feature.
      --force-help
          Show help on forcing.
  -Dh, --debug=help
          Show help on debugging.
  -?, --help
          Show this help message.
      --version
          Show the version.

<archive-spec> is: <.deb file name>... | (-R|--recursive) <directory>...
<package-spec> is: <package>... | (-a|--pending)

Validatable things: pkgname, archname, trigname, version.

Use dpkg with -b, --build, -c, --contents, -e, --control, -I, --info,
  -f, --field, -x, --extract, -X, --vextract, --ctrl-tarfile, --fsys-tarfile
on archives (type dpkg-deb --help).

Options:
  -O, --selected-only
          Skip packages not selected for install/upgrade.
  -E, --skip-same-version
          Skip packages with same installed version/arch.
  -G, --refuse-downgrade
          Skip packages with earlier version than installed.
  -B, --auto-deconfigure
          Install even if it would break some other package.
      --triggers
          Force consequential trigger processing.
      --no-triggers
          Skip consequential trigger processing.
      --verify-format=<format>
          Verify output format (supported: 'rpm').
      --robot
          Use machine-readable output on some commands.
      --no-pager
          Disables the use of any pager.
      --no-debsig
          Do not try to verify package signatures.
      --ignore-depends=<package>[,...]
          Ignore dependencies involving <package>.
      --force-<thing>[,...]
          Override problems (see --force-help).
          [default: security-mac,downgrade]
          [env: DPKG_FORCE=]
      --no-force-<thing>[,...]
          Stop when problems encountered.
      --refuse-<thing>[,...]
          Alias for --no-force.
      --abort-after <n>
          Abort after encountering <n> errors.
      --no-act
          Print what would be done, but perform no action.
      --dry-run
          Alias for --no-act.
      --simulate
          Alias for --no-act.
  -D, --debug=<octal>
          Enable debugging output (see -Dhelp or --debug=help).
      --path-exclude=<pattern>
          Do not install paths which match a shell pattern.
      --path-include=<pattern>
          Re-include a pattern after a previous exclusion.
      --pre-invoke=<command>
          Set a pre-invoke hook.
      --post-invoke=<command>
          Set a post-invoke hook.
      --status-fd <n>
          Send status change updates to file descriptor <n>.
      --status-logger=<command>
          Send status change updates to <command>'s stdin.
      --log=<filename>
          Log status changes and actions to <filename>.
      --admindir=<directory>
          Change the database directory.
          [default: /var/lib/dpkg]
          [env: DPKG_ADMINDIR=]
      --instdir=<directory>
          Change the installation directory.
          [default: /]
      --root=<directory>
          Change the root directory.
          [default: /]
          [env: DPKG_ROOT=]

Comparison operators for --compare-versions are:
  lt le eq ne ge gt       (treat empty version as earlier than any version);
  lt-nl le-nl ge-nl gt-nl (treat empty version as later than any version);
  < << <= = >= >> >       (only for compatibility with control file syntax).

Use 'apt' or 'aptitude' for user-friendly package management.
Options (64)
OptionDescriptionSource
-i, --install archive-specInstall the archives.help
--unpack archive-specUnpack the archives.help
--configure package-specConfigure the packages.help
--triggers-only package-specProcess triggers for the packages.help
-r, --remove package-specRemove the packages.help
-P, --purge package-specPurge the packages.help
-V, --verify package>...Verify the integrity of packages.help
-C, --audit package>...Check for broken packages.help
-s, --status package>...Show package status details.help
-l, --list pattern>...List packages concisely.help
-L, --listfiles package>...List files 'owned' by packages.help
-S, --search pattern>...Find packages owning files.help
--get-selections pattern>...Get list of selections to stdout.help
--set-selectionsSet package selections from stdin.help
--clear-selectionsDeselect every non-essential package.help
-p, --print-avail package>...Show available package version details.help
-A, --record-avail archive-specRecord the archives in the available file.help
--update-avail Packages-fileReplace available packages information.help
--merge-avail Packages-fileMerge available package information.help
--clear-availErase existing available package information.help
--add-architecture archAdd <arch> to the list of architectures.help
--remove-architecture archRemove <arch> from the list of architectures.help
--print-architecturePrint native dpkg architecture.help
--print-foreign-architecturesPrint allowed foreign architectures.help
--validate- thingValidate a <thing>'s <string>.help
--predep-packagePrint pre-dependencies to unpack.help
--assert-helpShow help on assertions.help
--assert- featureAssert support for the specified feature.help
--force-helpShow help on forcing.help
-Dh, --debug, -Doctal helpShow help on debugging.help + man
-?, --helpShow this help message.help
--versionShow the version.help
-f, --field, -x, --extract, -X, --vextract, --ctrl-tarfile, --fsys-tarfilehelp
-O, --selected-onlyOnly process the packages that are selected for installation.help + man
-E, --skip-same-versionDon't install the package if the same version and architecture of the package is already installed.help + man
-G, --refuse-downgradeDon't install a package if a newer version of the same package is already installed.help + man
-B, --auto-deconfigureWhen a package is removed, there is a possibility that another installed package depended on the removed package.help + man
--triggersForce consequential trigger processing.help + man
--no-triggersDo not run any triggers in this run, but activations will still be recorded.help + man
--verify-format formatSets the output format for the --verify command.help + man
--robotUse machine-readable output on some commands.help + man
--no-pagerDisables the use of any pager when showing information.help + man
--no-debsigDo not try to verify package signatures.help + man
--ignore-depends packageIgnore dependency-checking for specified packages (actually, checking is performed, but only warnings about conflicts are given, nothing else).help + man
--force- thingOverride problems (see --force-help).help
--no-force- thingStop when problems encountered.help
--refuse- thingAlias for --no-force.help
--abort-after nChange after how many errors dpkg will abort.help + man
--no-actPrint what would be done, but perform no action.help + man
--dry-runAlias for --no-act.help + man
--simulateDo everything which is supposed to be done, but don't write any changes.help + man
--path-exclude patternDo not install paths which match a shell pattern.help + man
--path-include patternSet glob-pattern as a path filter, either by excluding or re-including previously excluded paths matching the specified patterns during install.help + man
--pre-invoke commandSet a pre-invoke hook.help + man
--post-invoke commandSet an invoke hook command to be run via “sh -c” before or after the dpkg run for the unpack, configure, install, triggers-only, remove and purge actions (since dpkg 1.15.4), and add-architecture…help + man
--status-fd nSend machine-readable package status and progress information to file descriptor n.help + man
--status-logger commandSend machine-readable package status and progress information to the shell command's standard input, to be run via “sh -c”.help + man
--log filenameLog status change updates and actions to filename, instead of the default /var/log/dpkg.log.help + man
--admindir directorySet the administrative directory to directory.help + man
--instdir directorySet the installation directory, which refers to the directory where packages are to be installed.help + man
--root directorySet the root directory to directory, which sets the installation directory to «directory» and the administrative directory to «directory/var/lib/dpkg» if DPKG_ROOT has not been set (since dpkg…help + man
--force-things (in the manual page but not in --help)man
--no-force-things, --refuse-thingsForce or refuse (no-force and refuse mean the same thing) to do some things. (in the manual page but not in --help)man
-R, --recursiveRecursively handle all regular files matching pattern .deb found at specified directories and all of its subdirectories. (in the manual page but not in --help)man
Exit status (3) from the manual page
0The requested command was successfully performed.
1A check or assertion command returned false.
2Fatal or unrecoverable error due to invalid command-line usage, or interactions with the system, such as accesses to the database, memory allocations, etc.
Examples (8) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.