.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "dpkg 1" .TH dpkg 1 2024-03-10 1.22.6 "dpkg suite" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME dpkg \- package manager for Debian .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBdpkg\fR [\fIoption\fR...] \fIaction\fR .SH WARNING .IX Header "WARNING" This manual is intended for users wishing to understand \fBdpkg\fR's command line options and package states in more detail than that provided by \fBdpkg \-\-help\fR. .PP It should \fInot\fR be used by package maintainers wishing to understand how \fBdpkg\fR will install their packages. The descriptions of what \fBdpkg\fR does when installing and removing packages are particularly inadequate. .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBdpkg\fR is a medium-level tool to install, build, remove and manage Debian packages. The primary and more user-friendly front-end for \fBdpkg\fR as a CLI (command-line interface) is \fBapt\fR\|(8) and as a TUI (terminal user interface) is \fBaptitude\fR\|(8). \&\fBdpkg\fR itself is controlled entirely via command line parameters, which consist of exactly one action and zero or more options. The action-parameter tells \fBdpkg\fR what to do and options control the behavior of the action in some way. .PP \&\fBdpkg\fR can also be used as a front-end to \fBdpkg\-deb\fR\|(1) and \&\fBdpkg\-query\fR\|(1). The list of supported actions can be found later on in the \fBACTIONS\fR section. If any such action is encountered \fBdpkg\fR just runs \fBdpkg-deb\fR or \fBdpkg-query\fR with the parameters given to it, but no specific options are currently passed to them, to use any such option the back-ends need to be called directly. .SH "INFORMATION ABOUT PACKAGES" .IX Header "INFORMATION ABOUT PACKAGES" \&\fBdpkg\fR maintains some usable information about available packages. The information is divided in three classes: \fBstates\fR, \&\fBselection states\fR and \fBflags\fR. These values are intended to be changed mainly with \fBdselect\fR. .SS "Package states" .IX Subsection "Package states" .IP \fBnot-installed\fR 4 .IX Item "not-installed" The package is not installed on your system. .IP \fBconfig-files\fR 4 .IX Item "config-files" Only the configuration files or the \fBpostrm\fR script and the data it needs to remove of the package exist on the system. .IP \fBhalf-installed\fR 4 .IX Item "half-installed" The installation of the package has been started, but not completed for some reason. .IP \fBunpacked\fR 4 .IX Item "unpacked" The package is unpacked, but not configured. .IP \fBhalf-configured\fR 4 .IX Item "half-configured" The package is unpacked and configuration has been started, but not yet completed for some reason. .IP \fBtriggers-awaited\fR 4 .IX Item "triggers-awaited" The package awaits trigger processing by another package. .IP \fBtriggers-pending\fR 4 .IX Item "triggers-pending" The package has been triggered. .IP \fBinstalled\fR 4 .IX Item "installed" The package is correctly unpacked and configured. .SS "Package selection states" .IX Subsection "Package selection states" .IP \fBinstall\fR 4 .IX Item "install" The package is selected for installation. .IP \fBhold\fR 4 .IX Item "hold" A package marked to be on \fBhold\fR is kept on the same version, that is, no automatic new installs, upgrades or removals will be performed on them, unless these actions are requested explicitly, or are permitted to be done automatically with the \fB\-\-force\-hold\fR option. .IP \fBdeinstall\fR 4 .IX Item "deinstall" The package is selected for deinstallation (i.e. we want to remove all files, except configuration files). .IP \fBpurge\fR 4 .IX Item "purge" The package is selected to be purged (i.e. we want to remove everything from system directories, even configuration files). .IP \fBunknown\fR 4 .IX Item "unknown" The package selection is unknown. A package that is also in a \fBnot-installed\fR state, and with an \&\fBok\fR flag will be forgotten in the next database store. .SS "Package flags" .IX Subsection "Package flags" .IP \fBok\fR 4 .IX Item "ok" A package marked \fBok\fR is in a known state, but might need further processing. .IP \fBreinstreq\fR 4 .IX Item "reinstreq" A package marked \fBreinstreq\fR is broken and requires reinstallation. These packages cannot be removed, unless forced with option \fB\-\-force\-remove\-reinstreq\fR. .SH ACTIONS .IX Header "ACTIONS" .IP "\fB\-i\fR, \fB\-\-install\fR \fIpackage-file\fR..." 4 .IX Item "-i, --install package-file..." Install the package. If \fB\-\-recursive\fR or \fB\-R\fR option is specified, \fIpackage-file\fR must refer to a directory instead. .Sp Installation consists of the following steps: .RS 4 .IP \fB1.\fR 4 .IX Item "1." Extract the control files of the new package. .IP \fB2.\fR 4 .IX Item "2." If another version of the same package was installed before the new installation, execute \fIprerm\fR script of the old package. .IP \fB3.\fR 4 .IX Item "3." Run \fIpreinst\fR script, if provided by the package. .IP \fB4.\fR 4 .IX Item "4." Unpack the new files, and at the same time back up the old files, so that if something goes wrong, they can be restored. .IP \fB5.\fR 4 .IX Item "5." If another version of the same package was installed before the new installation, execute the \fIpostrm\fR script of the old package. Note that this script is executed after the \fIpreinst\fR script of the new package, because new files are written at the same time old files are removed. .IP \fB6.\fR 4 .IX Item "6." Configure the package. See \fB\-\-configure\fR for detailed information about how this is done. .RE .RS 4 .RE .IP "\fB\-\-unpack\fR \fIpackage-file\fR..." 4 .IX Item "--unpack package-file..." Unpack the package, but don't configure it. If \fB\-\-recursive\fR or \&\fB\-R\fR option is specified, \fIpackage-file\fR must refer to a directory instead. .Sp Will process triggers for \fBPre-Depends\fR unless \fB\-\-no\-triggers\fR has been specified. .IP "\fB\-\-configure\fR \fIpackage\fR...|\fB\-a\fR|\fB\-\-pending\fR" 4 .IX Item "--configure package...|-a|--pending" Configure a package which has been unpacked but not yet configured. If \fB\-a\fR or \fB\-\-pending\fR is given instead of \fIpackage\fR, all unpacked but unconfigured packages are configured. .Sp To reconfigure a package which has already been configured, try the \&\fBdpkg\-reconfigure\fR\|(8) command instead (which is part of the \fBdebconf\fR project). .Sp Configuring consists of the following steps: .RS 4 .IP \fB1.\fR 4 .IX Item "1." Unpack the conffiles, and at the same time back up the old conffiles, so that they can be restored if something goes wrong. .IP \fB2.\fR 4 .IX Item "2." Run \fIpostinst\fR script, if provided by the package. .RE .RS 4 .Sp Will process triggers unless \fB\-\-no\-triggers\fR has been specified. .RE .IP "\fB\-\-triggers\-only\fR \fIpackage\fR...|\fB\-a\fR|\fB\-\-pending\fR" 4 .IX Item "--triggers-only package...|-a|--pending" Processes only triggers (since dpkg 1.14.17). All pending triggers will be processed. If package names are supplied only those packages' triggers will be processed, exactly once each where necessary. Use of this option may leave packages in the improper \fBtriggers-awaited\fR and \fBtriggers-pending\fR states. This can be fixed later by running: \fBdpkg \-\-configure \-\-pending\fR. .IP "\fB\-r\fR, \fB\-\-remove\fR \fIpackage\fR...|\fB\-a\fR|\fB\-\-pending\fR" 4 .IX Item "-r, --remove package...|-a|--pending" Remove an installed package. This removes everything except conffiles and other data cleaned up by the \fIpostrm\fR script, which may avoid having to reconfigure the package if it is reinstalled later (conffiles are configuration files that are listed in the \&\fIDEBIAN/conffiles\fR control file). If there is no \fIDEBIAN/conffiles\fR control file nor \fIDEBIAN/postrm\fR script, this command is equivalent to calling \fB\-\-purge\fR. If \fB\-a\fR or \fB\-\-pending\fR is given instead of a package name, then all packages unpacked, but marked to be removed in file \&\fI/var/lib/dpkg/status\fR, are removed. .Sp Removing of a package consists of the following steps: .RS 4 .IP \fB1.\fR 4 .IX Item "1." Run \fIprerm\fR script. .IP \fB2.\fR 4 .IX Item "2." Remove the installed files. .IP \fB3.\fR 4 .IX Item "3." Run \fIpostrm\fR script. .RE .RS 4 .Sp Will process triggers unless \fB\-\-no\-triggers\fR has been specified. .RE .IP "\fB\-P\fR, \fB\-\-purge\fR \fIpackage\fR...|\fB\-a\fR|\fB\-\-pending\fR" 4 .IX Item "-P, --purge package...|-a|--pending" Purge an installed or already removed package. This removes everything, including conffiles, and anything else cleaned up from \fIpostrm\fR. If \fB\-a\fR or \fB\-\-pending\fR is given instead of a package name, then all packages unpacked or removed, but marked to be purged in file \&\fI/var/lib/dpkg/status\fR, are purged. .Sp \&\fBNote\fR: Some configuration files might be unknown to \fBdpkg\fR because they are created and handled separately through the configuration scripts. In that case, \fBdpkg\fR won't remove them by itself, but the package's \&\fIpostrm\fR script (which is called by \fBdpkg\fR), has to take care of their removal during purge. Of course, this only applies to files in system directories, not configuration files written to individual users' home directories. .Sp Purging of a package consists of the following steps: .RS 4 .IP \fB1.\fR 4 .IX Item "1." Remove the package, if not already removed. See \fB\-\-remove\fR for detailed information about how this is done. .IP \fB2.\fR 4 .IX Item "2." Run \fIpostrm\fR script. .RE .RS 4 .Sp Will process triggers unless \fB\-\-no\-triggers\fR has been specified. .RE .IP "\fB\-V\fR, \fB\-\-verify\fR [\fIpackage-name\fR...]" 4 .IX Item "-V, --verify [package-name...]" Verifies the integrity of \fIpackage-name\fR or all packages if omitted, by comparing information from the files installed by a package with the files metadata information stored in the \fBdpkg\fR database (since dpkg 1.17.2). The origin of the files metadata information in the database is the binary packages themselves. That metadata gets collected at package unpack time during the installation process. .Sp Currently the only functional check performed is an md5sum verification of the file contents against the stored value in the files database. It will only get checked if the database contains the file md5sum. To check for any missing metadata in the database, the \fB\-\-audit\fR command can be used. This is only an integrity check and should not be considered as any kind of security verification. .Sp The output format is selectable with the \fB\-\-verify\-format\fR option, which by default uses the \fBrpm\fR format, but that might change in the future, and as such, programs parsing this command output should be explicit about the format they expect. .IP "\fB\-C\fR, \fB\-\-audit\fR [\fIpackage-name\fR...]" 4 .IX Item "-C, --audit [package-name...]" Performs database sanity and consistency checks for \fIpackage-name\fR or all packages if omitted (per package checks since dpkg 1.17.10). For example, searches for packages that have been installed only partially on your system or that have missing, wrong or obsolete control data or files. \&\fBdpkg\fR will suggest what to do with them to get them fixed. .IP "\fB\-\-update\-avail\fR [\fIPackages-file\fR]" 4 .IX Item "--update-avail [Packages-file]" .PD 0 .IP "\fB\-\-merge\-avail\fR [\fIPackages-file\fR]" 4 .IX Item "--merge-avail [Packages-file]" .PD Update \fBdpkg\fR's and \fBdselect\fR's idea of which packages are available. With action \fB\-\-merge\-avail\fR, old information is combined with information from \fIPackages-file\fR. With action \&\fB\-\-update\-avail\fR, old information is replaced with the information in the \fIPackages-file\fR. The \fIPackages-file\fR distributed with Debian is simply named \(Fo\fIPackages\fR\(Fc. If the \fIPackages-file\fR argument is missing or named \(Fo\fB\-\fR\(Fc then it will be read from standard input (since dpkg 1.17.7). \&\fBdpkg\fR keeps its record of available packages in \fI/var/lib/dpkg/available\fR. .Sp A simpler one-shot command to retrieve and update the \fIavailable\fR file is \fBdselect update\fR. Note that this file is mostly useless if you don't use \fBdselect\fR but an APT-based frontend: APT has its own system to keep track of available packages. .IP "\fB\-A\fR, \fB\-\-record\-avail\fR \fIpackage-file\fR..." 4 .IX Item "-A, --record-avail package-file..." Update \fBdpkg\fR and \fBdselect\fR's idea of which packages are available with information from the package \fIpackage-file\fR. If \&\fB\-\-recursive\fR or \fB\-R\fR option is specified, \fIpackage-file\fR must refer to a directory instead. .IP \fB\-\-forget\-old\-unavail\fR 4 .IX Item "--forget-old-unavail" Now \fBobsolete\fR and a no-op as \fBdpkg\fR will automatically forget uninstalled unavailable packages (since dpkg 1.15.4), but only those that do not contain user information such as package selections. .IP \fB\-\-clear\-avail\fR 4 .IX Item "--clear-avail" Erase the existing information about what packages are available. .IP "\fB\-\-get\-selections\fR [\fIpackage-name-pattern\fR...]" 4 .IX Item "--get-selections [package-name-pattern...]" Get list of package selections, and write it to stdout. Without a pattern, non-installed packages (i.e. those which have been previously purged) will not be shown. .IP \fB\-\-set\-selections\fR 4 .IX Item "--set-selections" Set package selections using file read from stdin. This file should be in the format \(lq\fIpackage\fR \fIstate\fR\(rq, where state is one of \&\fBinstall\fR, \fBhold\fR, \fBdeinstall\fR or \fBpurge\fR. Blank lines and comment lines beginning with \(oq\fB#\fR\(cq are also permitted. .Sp The \fIavailable\fR file needs to be up-to-date for this command to be useful, otherwise unknown packages will be ignored with a warning. See the \fB\-\-update\-avail\fR and \fB\-\-merge\-avail\fR commands for more information. .IP \fB\-\-clear\-selections\fR 4 .IX Item "--clear-selections" Set the requested state of every non-essential package to deinstall (since dpkg 1.13.18). This is intended to be used immediately before \fB\-\-set\-selections\fR, to deinstall any packages not in list given to \fB\-\-set\-selections\fR. .IP \fB\-\-yet\-to\-unpack\fR 4 .IX Item "--yet-to-unpack" Searches for packages selected for installation, but which for some reason still haven't been installed. .Sp \&\fBNote\fR: This command makes use of both the available file and the package selections. .IP \fB\-\-predep\-package\fR 4 .IX Item "--predep-package" Print a single package which is the target of one or more relevant pre-dependencies and has itself no unsatisfied pre-dependencies. .Sp If such a package is present, output it as a Packages file entry, which can be massaged as appropriate. .Sp \&\fBNote\fR: This command makes use of both the available file and the package selections. .Sp Returns 0 when a package is printed, 1 when no suitable package is available and 2 on error. .IP "\fB\-\-add\-architecture\fR \fIarchitecture\fR" 4 .IX Item "--add-architecture architecture" Add \fIarchitecture\fR to the list of architectures for which packages can be installed without using \fB\-\-force\-architecture\fR (since dpkg 1.16.2). The architecture \&\fBdpkg\fR is built for (i.e. the output of \fB\-\-print\-architecture\fR) is always part of that list. .IP "\fB\-\-remove\-architecture\fR \fIarchitecture\fR" 4 .IX Item "--remove-architecture architecture" Remove \fIarchitecture\fR from the list of architectures for which packages can be installed without using \fB\-\-force\-architecture\fR (since dpkg 1.16.2). If the architecture is currently in use in the database then the operation will be refused, except if \fB\-\-force\-architecture\fR is specified. The architecture \fBdpkg\fR is built for (i.e. the output of \&\fB\-\-print\-architecture\fR) can never be removed from that list. .IP \fB\-\-print\-architecture\fR 4 .IX Item "--print-architecture" Print architecture of packages \fBdpkg\fR installs (for example, \(lqi386\(rq). .IP \fB\-\-print\-foreign\-architectures\fR 4 .IX Item "--print-foreign-architectures" Print a newline-separated list of the extra architectures \fBdpkg\fR is configured to allow packages to be installed for (since dpkg 1.16.2). .IP \fB\-\-assert\-help\fR 4 .IX Item "--assert-help" Give help about the \fB\-\-assert\-\fR\fIfeature\fR options (since dpkg 1.21.0). .IP \fB\-\-assert\-\fR\fIfeature\fR 4 .IX Item "--assert-feature" Asserts that \fBdpkg\fR supports the requested feature. Returns 0 if the feature is fully supported, 1 if the feature is known but \&\fBdpkg\fR cannot provide support for it yet, and 2 if the feature is unknown. The current list of assertable features is: .RS 4 .IP \fBsupport-predepends\fR 4 .IX Item "support-predepends" Supports the \fBPre-Depends\fR field (since dpkg 1.1.0). .IP \fBworking-epoch\fR 4 .IX Item "working-epoch" Supports epochs in version strings (since dpkg 1.4.0.7). .IP \fBlong-filenames\fR 4 .IX Item "long-filenames" Supports long filenames in \fBdeb\fR\|(5) archives (since dpkg 1.4.1.17). .IP \fBmulti-conrep\fR 4 .IX Item "multi-conrep" Supports multiple \fBConflicts\fR and \fBReplaces\fR (since dpkg 1.4.1.19). .IP \fBmulti-arch\fR 4 .IX Item "multi-arch" Supports multi-arch fields and semantics (since dpkg 1.16.2). .IP \fBversioned-provides\fR 4 .IX Item "versioned-provides" Supports versioned \fBProvides\fR (since dpkg 1.17.11). .IP \fBprotected-field\fR 4 .IX Item "protected-field" Supports the \fBProtected\fR field (since dpkg 1.20.1). .RE .RS 4 .RE .IP "\fB\-\-validate\-\fR\fIthing\fR \fIstring\fR" 4 .IX Item "--validate-thing string" Validate that the \fIthing\fR \fIstring\fR has a correct syntax (since dpkg 1.18.16). Returns 0 if the \fIstring\fR is valid, 1 if the \fIstring\fR is invalid but might be accepted in lax contexts, and 2 if the \fIstring\fR is invalid. The current list of validatable \fIthing\fRs is: .RS 4 .IP \fBpkgname\fR 4 .IX Item "pkgname" Validates the given package name (since dpkg 1.18.16). .IP \fBtrigname\fR 4 .IX Item "trigname" Validates the given trigger name (since dpkg 1.18.16). .IP \fBarchname\fR 4 .IX Item "archname" Validates the given architecture name (since dpkg 1.18.16). .IP \fBversion\fR 4 .IX Item "version" Validates the given version (since dpkg 1.18.16). .RE .RS 4 .RE .IP "\fB\-\-compare\-versions\fR \fIver1\fR \fIop\fR \fIver2\fR" 4 .IX Item "--compare-versions ver1 op ver2" Compare version numbers, where \fIop\fR is a binary operator. \&\fBdpkg\fR returns true (\fB0\fR) if the specified condition is satisfied, and false (\fB1\fR) otherwise. There are two groups of operators, which differ in how they treat an empty \&\fIver1\fR or \fIver2\fR. These treat an empty version as earlier than any version: \&\fBlt le eq ne ge gt\fR. These treat an empty version as later than any version: \&\fBlt-nl le-nl ge-nl gt-nl\fR. These are provided only for compatibility with control file syntax: \fB< << <= = >= >> >\fR. The \fB<\fR and \fB>\fR operators are obsolete and should \fBnot\fR be used, due to confusing semantics. To illustrate: \fB0.1 < 0.1\fR evaluates to true. .IP "\fB\-?\fR, \fB\-\-help\fR" 4 .IX Item "-?, --help" Display a brief help message. .IP \fB\-\-force\-help\fR 4 .IX Item "--force-help" Give help about the \fB\-\-force\-\fR\fIthing\fR options. .IP "\fB\-Dh\fR, \fB\-\-debug=help\fR" 4 .IX Item "-Dh, --debug=help" Give help about debugging options. .IP \fB\-\-version\fR 4 .IX Item "--version" Display \fBdpkg\fR version information. .Sp When used with \fB\-\-robot\fR, the output will be the program version number in a dotted numerical format, with no newline. .IP "\fBdpkg-deb actions\fR" 4 .IX Item "dpkg-deb actions" See \fBdpkg\-deb\fR\|(1) for more information about the following actions, and other actions and options not exposed by the \fBdpkg\fR front-end. .RS 4 .IP "\fB\-b\fR, \fB\-\-build\fR \fIdirectory\fR [\fIarchive\fR|\fIdirectory\fR]" 4 .IX Item "-b, --build directory [archive|directory]" Build a deb package. .IP "\fB\-c\fR, \fB\-\-contents\fR \fIarchive\fR" 4 .IX Item "-c, --contents archive" List contents of a deb package. .IP "\fB\-e\fR, \fB\-\-control\fR \fIarchive\fR [\fIdirectory\fR]" 4 .IX Item "-e, --control archive [directory]" Extract control-information from a package. .IP "\fB\-x\fR, \fB\-\-extract\fR \fIarchive\fR \fIdirectory\fR" 4 .IX Item "-x, --extract archive directory" Extract the files contained by package. .IP "\fB\-X\fR, \fB\-\-vextract\fR \fIarchive\fR \fIdirectory\fR" 4 .IX Item "-X, --vextract archive directory" Extract and display the filenames contained by a package. .IP "\fB\-f\fR, \fB\-\-field\fR \fIarchive\fR [\fIcontrol-field\fR...]" 4 .IX Item "-f, --field archive [control-field...]" Display control field(s) of a package. .IP "\fB\-\-ctrl\-tarfile\fR \fIarchive\fR" 4 .IX Item "--ctrl-tarfile archive" Output the control tar-file contained in a Debian package. .IP "\fB\-\-fsys\-tarfile\fR \fIarchive\fR" 4 .IX Item "--fsys-tarfile archive" Output the filesystem tar-file contained by a Debian package. .IP "\fB\-I\fR, \fB\-\-info\fR \fIarchive\fR [\fIcontrol-file\fR...]" 4 .IX Item "-I, --info archive [control-file...]" Show information about a package. .RE .RS 4 .RE .IP "\fBdpkg-query actions\fR" 4 .IX Item "dpkg-query actions" See \fBdpkg\-query\fR\|(1) for more information about the following actions, and other actions and options not exposed by the \fBdpkg\fR front-end. .RS 4 .IP "\fB\-l\fR, \fB\-\-list\fR \fIpackage-name-pattern\fR..." 4 .IX Item "-l, --list package-name-pattern..." List packages matching given pattern. .IP "\fB\-s\fR, \fB\-\-status\fR \fIpackage-name\fR..." 4 .IX Item "-s, --status package-name..." Report status of specified package. .IP "\fB\-L\fR, \fB\-\-listfiles\fR \fIpackage-name\fR..." 4 .IX Item "-L, --listfiles package-name..." List files installed to your system from \fIpackage-name\fR. .IP "\fB\-S\fR, \fB\-\-search\fR \fIfilename-search-pattern\fR..." 4 .IX Item "-S, --search filename-search-pattern..." Search for a filename from installed packages. .IP "\fB\-p\fR, \fB\-\-print\-avail\fR \fIpackage-name\fR..." 4 .IX Item "-p, --print-avail package-name..." Display details about \fIpackage-name\fR, as found in \&\fI/var/lib/dpkg/available\fR. Users of APT-based frontends should use \fBapt show\fR \fIpackage-name\fR instead. .RE .RS 4 .RE .SH OPTIONS .IX Header "OPTIONS" All options can be specified both on the command line and in the \fBdpkg\fR configuration file \fI/etc/dpkg/dpkg.cfg\fR or fragment files (with names matching this shell pattern '[0\-9a\-zA\-Z_\-]*') on the configuration directory \fI/etc/dpkg/dpkg.cfg.d/\fR. Each line in the configuration file is either an option (exactly the same as the command line option but without leading hyphens) or a comment (if it starts with a \(oq\fB#\fR\(cq). .IP \fB\-\-abort\-after=\fR\fInumber\fR 4 .IX Item "--abort-after=number" Change after how many errors \fBdpkg\fR will abort. The default is 50. .IP "\fB\-B\fR, \fB\-\-auto\-deconfigure\fR" 4 .IX Item "-B, --auto-deconfigure" When a package is removed, there is a possibility that another installed package depended on the removed package. Specifying this option will cause automatic deconfiguration of the package which depended on the removed package. .IP "\fB\-D\fR\fIoctal\fR, \fB\-\-debug=\fR\fIoctal\fR" 4 .IX Item "-Doctal, --debug=octal" Switch debugging on. \&\fIoctal\fR is formed by bitwise-ORing desired values together from the list below (note that these values may change in future releases). \&\fB\-Dh\fR or \fB\-\-debug=help\fR display these debugging values. .Sp .Vb 10 \& Number Description \& 1 Generally helpful progress information \& 2 Invocation and status of maintainer scripts \& 10 Output for each file processed \& 100 Lots of output for each file processed \& 20 Output for each configuration file \& 200 Lots of output for each configuration file \& 40 Dependencies and conflicts \& 400 Lots of dependencies/conflicts output \& 10000 Trigger activation and processing \& 20000 Lots of output regarding triggers \& 40000 Silly amounts of output regarding triggers \& 1000 Lots of drivel about for example the dpkg/info dir \& 2000 Insane amounts of drivel .Ve .IP \fB\-\-force\-\fR\fIthings\fR 4 .IX Item "--force-things" .PD 0 .IP "\fB\-\-no\-force\-\fR\fIthings\fR, \fB\-\-refuse\-\fR\fIthings\fR" 4 .IX Item "--no-force-things, --refuse-things" .PD Force or refuse (\fBno-force\fR and \fBrefuse\fR mean the same thing) to do some things. \&\fIthings\fR is a comma separated list of things specified below. \&\fB\-\-force\-help\fR displays a message describing them. Things marked with (*) are forced by default. .Sp \&\fBWarning\fR: These options are mostly intended to be used by experts only. Using them without fully understanding their effects may break your whole system. .RS 4 .IP \fBall\fR: 2 .IX Item "all:" Turns on (or off) all force options. .IP \fBdowngrade\fR(*): 2 .IX Item "downgrade(*):" Install a package, even if newer version of it is already installed. .Sp \&\fBWarning\fR: At present \fBdpkg\fR does not do any dependency checking on downgrades and therefore will not warn you if the downgrade breaks the dependency of some other package. This can have serious side effects, downgrading essential system components can even make your whole system unusable. Use with care. .IP \fBconfigure-any\fR: 2 .IX Item "configure-any:" Configure also any unpacked but unconfigured packages on which the current package depends. .IP \fBhold\fR: 2 .IX Item "hold:" Allow automatic installs, upgrades or removals of packages even when marked to be on \(lqhold\(rq. \&\fBNote\fR: When these actions are requested explicitly, the \(lqhold\(rq package selection state always gets ignored. .IP \fBremove-reinstreq\fR: 2 .IX Item "remove-reinstreq:" Remove a package, even if it's broken and marked to require reinstallation. This may, for example, cause parts of the package to remain on the system, which will then be forgotten by \fBdpkg\fR. .IP \fBremove-protected\fR: 2 .IX Item "remove-protected:" Remove, even if the package is considered protected (since dpkg 1.20.1). Protected packages contain mostly important system boot infrastructure or are used for custom system-local meta-packages. Removing them might cause the whole system to be unable to boot or lose required functionality to operate, so use with caution. .IP \fBremove-essential\fR: 2 .IX Item "remove-essential:" Remove, even if the package is considered essential. Essential packages contain mostly very basic Unix commands, required for the packaging system, for the operation of the system in general or during boot (although the latter should be converted to protected packages instead). Removing them might cause the whole system to stop working, so use with caution. .IP \fBdepends\fR: 2 .IX Item "depends:" Turn all dependency problems into warnings. This affects the \fBPre-Depends\fR and \fBDepends\fR fields. .IP \fBdepends-version\fR: 2 .IX Item "depends-version:" Don't care about versions when checking dependencies. This affects the \fBPre-Depends\fR and \fBDepends\fR fields. .IP \fBbreaks\fR: 2 .IX Item "breaks:" Install, even if this would break another package (since dpkg 1.14.6). This affects the \fBBreaks\fR field. .IP \fBconflicts\fR: 2 .IX Item "conflicts:" Install, even if it conflicts with another package. This is dangerous, for it will usually cause overwriting of some files. This affects the \fBConflicts\fR field. .IP \fBconfmiss\fR: 2 .IX Item "confmiss:" Always install the missing conffile without prompting. This is dangerous, since it means not preserving a change (removing) made to the file. .IP \fBconfnew\fR: 2 .IX Item "confnew:" If a conffile has been modified and the version in the package did change, always install the new version without prompting, unless the \&\fB\-\-force\-confdef\fR is also specified, in which case the default action is preferred. .IP \fBconfold\fR: 2 .IX Item "confold:" If a conffile has been modified and the version in the package did change, always keep the old version without prompting, unless the \&\fB\-\-force\-confdef\fR is also specified, in which case the default action is preferred. .IP \fBconfdef\fR: 2 .IX Item "confdef:" If a conffile has been modified and the version in the package did change, always choose the default action without prompting. If there is no default action it will stop to ask the user unless \fB\-\-force\-confnew\fR or \&\fB\-\-force\-confold\fR is also given, in which case it will use that to decide the final action. .IP \fBconfask\fR: 2 .IX Item "confask:" If a conffile has been modified always offer to replace it with the version in the package, even if the version in the package did not change (since dpkg 1.15.8). If any of \fB\-\-force\-confnew\fR, \&\fB\-\-force\-confold\fR, or \fB\-\-force\-confdef\fR is also given, it will be used to decide the final action. .IP \fBoverwrite\fR: 2 .IX Item "overwrite:" Overwrite one package's file with another's file. .IP \fBoverwrite-dir\fR: 2 .IX Item "overwrite-dir:" Overwrite one package's directory with another's file. .IP \fBoverwrite-diverted\fR: 2 .IX Item "overwrite-diverted:" Overwrite a diverted file with an undiverted version. .IP \fBstatoverride-add\fR: 2 .IX Item "statoverride-add:" Overwrite an existing stat override when adding it (since dpkg 1.19.5). .IP \fBstatoverride-remove\fR: 2 .IX Item "statoverride-remove:" Ignore a missing stat override when removing it (since dpkg 1.19.5). .IP \fBsecurity-mac\fR(*): 2 .IX Item "security-mac(*):" Use platform-specific Mandatory Access Controls (MAC) based security when installing files into the filesystem (since dpkg 1.19.5). On Linux systems the implementation uses SELinux. .IP \fBunsafe-io\fR: 2 .IX Item "unsafe-io:" Do not perform safe I/O operations when unpacking (since dpkg 1.15.8.6). Currently this implies not performing file system syncs before file renames, which is known to cause substantial performance degradation on some file systems, unfortunately the ones that require the safe I/O on the first place due to their unreliable behaviour causing zero-length files on abrupt system crashes. .Sp \&\fINote\fR: For ext4, the main offender, consider using instead the mount option \fBnodelalloc\fR, which will fix both the performance degradation and the data safety issues, the latter by making the file system not produce zero-length files on abrupt system crashes with any software not doing syncs before atomic renames. .Sp \&\fBWarning\fR: Using this option might improve performance at the cost of losing data, use with care. .IP \fBscript-chrootless\fR: 2 .IX Item "script-chrootless:" Run maintainer scripts without \fBchroot\fR\|(2)ing into \fBinstdir\fR even if the package does not support this mode of operation (since dpkg 1.18.5). .Sp \&\fBWarning\fR: This can destroy your host system, use with extreme care. .IP \fBarchitecture\fR: 2 .IX Item "architecture:" Process even packages with wrong or no architecture. .IP \fBbad-version\fR: 2 .IX Item "bad-version:" Process even packages with wrong versions (since dpkg 1.16.1). .IP \fBbad-path\fR: 2 .IX Item "bad-path:" \&\fBPATH\fR is missing important programs, so problems are likely. .IP \fBnot-root\fR: 2 .IX Item "not-root:" Try to (de)install things even when not root. .IP \fBbad-verify\fR: 2 .IX Item "bad-verify:" Install a package even if it fails authenticity check. .RE .RS 4 .RE .IP \fB\-\-ignore\-depends\fR=\fIpackage\fR,... 4 .IX Item "--ignore-depends=package,..." Ignore dependency-checking for specified packages (actually, checking is performed, but only warnings about conflicts are given, nothing else). This affects the \fBPre-Depends\fR, \fBDepends\fR and \fBBreaks\fR fields. .IP "\fB\-\-no\-act\fR, \fB\-\-dry\-run\fR, \fB\-\-simulate\fR" 4 .IX Item "--no-act, --dry-run, --simulate" Do everything which is supposed to be done, but don't write any changes. This is used to see what would happen with the specified action, without actually modifying anything. .Sp Be sure to give \fB\-\-no\-act\fR before the action-parameter, or you might end up with undesirable results (e.g. \fBdpkg \-\-purge foo \-\-no\-act\fR will first purge package \(lqfoo\(rq and then try to purge package \(rq\-\-no\-act\(rq, even though you probably expected it to actually do nothing). .IP "\fB\-R\fR, \fB\-\-recursive\fR" 4 .IX Item "-R, --recursive" Recursively handle all regular files matching pattern \fB*.deb\fR found at specified directories and all of its subdirectories. This can be used with \fB\-i\fR, \fB\-A\fR, \fB\-\-install\fR, \fB\-\-unpack\fR and \&\fB\-\-record\-avail\fR actions. .IP \fB\-G\fR 4 .IX Item "-G" Don't install a package if a newer version of the same package is already installed. This is an alias of \fB\-\-refuse\-downgrade\fR. .IP \fB\-\-admindir=\fR\fIdir\fR 4 .IX Item "--admindir=dir" Set the administrative directory to \fIdirectory\fR. This directory contains many files that give information about status of installed or uninstalled packages, etc. Defaults to \(Fo\fI/var/lib/dpkg\fR\(Fc if \fBDPKG_ADMINDIR\fR has not been set. .IP \fB\-\-instdir=\fR\fIdir\fR 4 .IX Item "--instdir=dir" Set the installation directory, which refers to the directory where packages are to be installed. \&\fBinstdir\fR is also the directory passed to \fBchroot\fR\|(2) before running package's installation scripts, which means that the scripts see \fBinstdir\fR as a root directory. Defaults to \(Fo\fI/\fR\(Fc. .IP \fB\-\-root=\fR\fIdir\fR 4 .IX Item "--root=dir" Set the root directory to \fBdirectory\fR, which sets the installation directory to \(Fo\fIdir\fR\(Fc and the administrative directory to \(Fo\fIdir\fR\fB/var/lib/dpkg\fR\(Fc. .IP "\fB\-O\fR, \fB\-\-selected\-only\fR" 4 .IX Item "-O, --selected-only" Only process the packages that are selected for installation. The actual marking is done with \fBdselect\fR or by \fBdpkg\fR, when it handles packages. For example, when a package is removed, it will be marked selected for deinstallation. .IP "\fB\-E\fR, \fB\-\-skip\-same\-version\fR" 4 .IX Item "-E, --skip-same-version" Don't install the package if the same version and architecture of the package is already installed. .Sp Since dpkg 1.21.10, the architecture is also taken into account, which makes it possible to cross-grade packages or install additional co-installable instances with the same version, but different architecture. .IP \fB\-\-pre\-invoke=\fR\fIcommand\fR 4 .IX Item "--pre-invoke=command" .PD 0 .IP \fB\-\-post\-invoke=\fR\fIcommand\fR 4 .IX Item "--post-invoke=command" .PD Set an invoke hook \fIcommand\fR to be run via \(lqsh \-c\(rq before or after the \fBdpkg\fR run for the \fIunpack\fR, \fIconfigure\fR, \fIinstall\fR, \&\fItriggers-only\fR, \&\fIremove\fR and \&\fIpurge\fR actions (since dpkg 1.15.4), and \&\fIadd-architecture\fR and \&\fIremove-architecture\fR actions (since dpkg 1.17.19). This option can be specified multiple times. The order the options are specified is preserved, with the ones from the configuration files taking precedence. The environment variable \fBDPKG_HOOK_ACTION\fR is set for the hooks to the current \fBdpkg\fR action. .Sp \&\fBNote\fR: Front-ends might call \fBdpkg\fR several times per invocation, which might run the hooks more times than expected. .IP \fB\-\-path\-exclude=\fR\fIglob-pattern\fR 4 .IX Item "--path-exclude=glob-pattern" .PD 0 .IP \fB\-\-path\-include=\fR\fIglob-pattern\fR 4 .IX Item "--path-include=glob-pattern" .PD Set \fIglob-pattern\fR as a path filter, either by excluding or re-including previously excluded paths matching the specified patterns during install (since dpkg 1.15.8). .Sp \&\fBWarning\fR: Take into account that depending on the excluded paths you might completely break your system, use with caution. .Sp The glob patterns use the same wildcards used in the shell, were \(oq*\(cq matches any sequence of characters, including the empty string and also \(oq/\(cq. For example, \(Fo\fI/usr/*/READ*\fR\(Fc matches \(Fo\fI/usr/share/doc/package/README\fR\(Fc. As usual, \(oq?\(cq matches any single character (again, including \(oq/\(cq). And \(oq[\(cq starts a character class, which can contain a list of characters, ranges and complementations. See \fBglob\fR\|(7) for detailed information about globbing. \&\fBNote\fR: The current implementation might re-include more directories and symlinks than needed, in particular when there is a more specific re-inclusion, to be on the safe side and avoid possible unpack failures; future work might fix this. .Sp This can be used to remove all paths except some particular ones; a typical case is: .Sp .Vb 2 \& \-\-path\-exclude=/usr/share/doc/* \& \-\-path\-include=/usr/share/doc/*/copyright .Ve .Sp to remove all documentation files except the copyright files. .Sp These two options can be specified multiple times, and interleaved with each other. Both are processed in the given order, with the last rule that matches a file name making the decision. .Sp The filters are applied when unpacking the binary packages, and as such only have knowledge of the type of object currently being filtered (e.g. a normal file or a directory) and have not visibility of what objects will come next. Because these filters have side effects (in contrast to \fBfind\fR\|(1) filters), excluding an exact pathname that happens to be a directory object like \fI/usr/share/doc\fR will not have the desired result, and only that pathname will be excluded (which could be automatically reincluded if the code sees the need). Any subsequent files contained within that directory will fail to unpack. .Sp \&\fBHint\fR: make sure the globs are not expanded by your shell. .IP "\fB\-\-verify\-format\fR \fIformat-name\fR" 4 .IX Item "--verify-format format-name" Sets the output format for the \fB\-\-verify\fR command (since dpkg 1.17.2). .Sp The only currently supported output format is \fBrpm\fR, which consists of a line for every path that failed any check. These lines have the following format: .Sp \fBmissing \fR [\fBc\fR] \fIpathname\fR [\fB(\fR\fIerror-message\fR\fB)\fR] \fB??5??????\fR [\fBc\fR] \fIpathname\fR .Sp The first 9 characters are used to report the checks result, either a literal \fBmissing\fR when the file is not present or its metadata cannot be fetched, or one of the following special characters that report the result for each check: .RS 4 .IP \(oq\fB?\fR\(cq 4 .IX Item "\(oq?\(cq" Implies the check could not be done (lack of support, file permissions, etc). .IP \(oq\fB.\fR\(cq 4 .IX Item "\(oq.\(cq" Implies the check passed. .IP \(oq\fIA\-Za\-z0\-9\fR\(cq 4 .IX Item "\(oqA-Za-z0-9\(cq" Implies a specific check failed. The following positions and alphanumeric characters are currently supported: .RS 4 .IP "1 \(oq\fB?\fR\(cq" 4 .IX Item "1 \(oq?\(cq" These checks are currently not supported, will always be \(oq\fB?\fR\(cq. .IP "2 \(oq\fBM\fR\(cq" 4 .IX Item "2 \(oqM\(cq" The file mode check failed (since dpkg 1.21.0). Because pathname metadata is currently not tracked, this check can only be partially emulated via a very simple heuristic for pathnames that have a known digest, which implies they should be regular files, where the check will fail if the pathname is not a regular file on the filesystem. This check will currently never succeed as it does not have enough information available. .IP "3 \(oq\fB5\fR\(cq" 4 .IX Item "3 \(oq5\(cq" The digest check failed, which means the file contents have changed. This is only an integrity check and should not be considered as any kind of security verification. .IP "4\-9 \(oq\fB?\fR\(cq" 4 .IX Item "4-9 \(oq?\(cq" These checks are currently not supported, will always be \(oq\fB?\fR\(cq. .RE .RS 4 .RE .RE .RS 4 .Sp The line is followed by a space and an attribute character. The following attribute character is supported: .IP \(oq\fBc\fR\(cq 4 .IX Item "\(oqc\(cq" The pathname is a conffile. .RE .RS 4 .Sp Finally followed by another space and the pathname. .Sp In case the entry was of the \fBmissing\fR type, and the file was not actually present on the filesystem, then the line is followed by a space and the error message enclosed within parenthesis. .RE .IP "\fB\-\-status\-fd\fR \fIn\fR" 4 .IX Item "--status-fd n" Send machine-readable package status and progress information to file descriptor \fIn\fR. This option can be specified multiple times. The information is generally one record per line, in one of the following forms: .RS 4 .IP "\fBstatus:\fR \fIpackage\fR\fB:\fR \fIstatus\fR" 4 .IX Item "status: package: status" Package status changed; \fIstatus\fR is as in the status file. .IP "\fBstatus:\fR \fIpackage\fR \fB: error :\fR \fIextended-error-message\fR" 4 .IX Item "status: package : error : extended-error-message" An error occurred. Any possible newlines in \fIextended-error-message\fR will be converted to spaces before output. .IP "\fBstatus:\fR \fIfile\fR \fB: conffile-prompt : '\fR\fIreal-old\fR\fB' '\fR\fIreal-new\fR\fB'\fR \fIuseredited\fR \fIdistedited\fR" 4 .IX Item "status: file : conffile-prompt : 'real-old' 'real-new' useredited distedited" User is being asked a conffile question. .IP "\fBprocessing:\fR \fIstage\fR\fB:\fR \fIpackage\fR" 4 .IX Item "processing: stage: package" Sent just before a processing stage starts. \&\fIstage\fR is one of \&\fBupgrade\fR, \fBinstall\fR (both sent before unpacking), \&\fBconfigure\fR, \fBtrigproc\fR, \fBdisappear\fR, \fBremove\fR, \fBpurge\fR. .RE .RS 4 .RE .IP \fB\-\-status\-logger\fR=\fIcommand\fR 4 .IX Item "--status-logger=command" Send machine-readable package status and progress information to the shell \fIcommand\fR's standard input, to be run via \(lqsh \-c\(rq (since dpkg 1.16.0). This option can be specified multiple times. The output format used is the same as in \fB\-\-status\-fd\fR. .IP \fB\-\-log=\fR\fIfilename\fR 4 .IX Item "--log=filename" Log status change updates and actions to \fIfilename\fR, instead of the default \fI/var/log/dpkg.log\fR. If this option is given multiple times, the last filename is used. Log messages are of the form: .RS 4 .IP "YYYY-MM-DD HH:MM:SS \fBstartup\fR \fItype\fR \fIcommand\fR" 4 .IX Item "YYYY-MM-DD HH:MM:SS startup type command" For each dpkg invocation where \fItype\fR is \fBarchives\fR (with a \&\fIcommand\fR of \fBunpack\fR or \fBinstall\fR) or \fBpackages\fR (with a \fIcommand\fR of \fBconfigure\fR, \fBtriggers-only\fR, \&\fBremove\fR or \fBpurge\fR). .IP "YYYY-MM-DD HH:MM:SS \fBstatus\fR \fIstate\fR \fIpkg\fR \fIinstalled-version\fR" 4 .IX Item "YYYY-MM-DD HH:MM:SS status state pkg installed-version" For status change updates. .IP "YYYY-MM-DD HH:MM:SS \fIaction\fR \fIpkg\fR \fIinstalled-version\fR \fIavailable-version\fR" 4 .IX Item "YYYY-MM-DD HH:MM:SS action pkg installed-version available-version" For actions where \fIaction\fR is one of \fBinstall\fR, \fBupgrade\fR, \&\fBconfigure\fR, \fBtrigproc\fR, \fBdisappear\fR, \fBremove\fR or \fBpurge\fR. .IP "YYYY-MM-DD HH:MM:SS \fBconffile\fR \fIfilename\fR \fIdecision\fR" 4 .IX Item "YYYY-MM-DD HH:MM:SS conffile filename decision" For conffile changes where \fIdecision\fR is either \fBinstall\fR or \&\fBkeep\fR. .RE .RS 4 .RE .IP \fB\-\-robot\fR 4 .IX Item "--robot" Use a machine-readable output format. This provides an interface for programs that need to parse the output of some of the commands that do not otherwise emit a machine-readable output format. No localization will be used, and the output will be modified to make it easier to parse. .Sp The only currently supported command is \fB\-\-version\fR. .IP \fB\-\-no\-pager\fR 4 .IX Item "--no-pager" Disables the use of any pager when showing information (since dpkg 1.19.2). .IP \fB\-\-no\-debsig\fR 4 .IX Item "--no-debsig" Do not try to verify package signatures. .IP \fB\-\-no\-triggers\fR 4 .IX Item "--no-triggers" Do not run any triggers in this run (since dpkg 1.14.17), but activations will still be recorded. If used with \fB\-\-configure\fR \fIpackage\fR or \&\fB\-\-triggers\-only\fR \fIpackage\fR then the named package postinst will still be run even if only a triggers run is needed. Use of this option may leave packages in the improper \fBtriggers-awaited\fR and \&\fBtriggers-pending\fR states. This can be fixed later by running: \&\fBdpkg \-\-configure \-\-pending\fR. .IP \fB\-\-triggers\fR 4 .IX Item "--triggers" Cancels a previous \fB\-\-no\-triggers\fR (since dpkg 1.14.17). .SH "EXIT STATUS" .IX Header "EXIT STATUS" .IP \fB0\fR 4 .IX Item "0" The requested action was successfully performed. Or a check or assertion command returned true. .IP \fB1\fR 4 .IX Item "1" A check or assertion command returned false. .IP \fB2\fR 4 .IX Item "2" Fatal or unrecoverable error due to invalid command-line usage, or interactions with the system, such as accesses to the database, memory allocations, etc. .SH ENVIRONMENT .IX Header "ENVIRONMENT" .SS "External environment" .IX Subsection "External environment" .IP \fBPATH\fR 4 .IX Item "PATH" This variable is expected to be defined in the environment and point to the system paths where several required programs are to be found. If it's not set or the programs are not found, \fBdpkg\fR will abort. .IP \fBHOME\fR 4 .IX Item "HOME" If set, \fBdpkg\fR will use it as the directory from which to read the user specific configuration file. .IP \fBTMPDIR\fR 4 .IX Item "TMPDIR" If set, \fBdpkg\fR will use it as the directory in which to create temporary files and directories. .IP \fBSHELL\fR 4 .IX Item "SHELL" The program \fBdpkg\fR will execute when starting a new interactive shell, or when spawning a command via a shell. .IP \fBPAGER\fR 4 .IX Item "PAGER" .PD 0 .IP \fBDPKG_PAGER\fR 4 .IX Item "DPKG_PAGER" .PD The program \fBdpkg\fR will execute when running a pager, which will be executed with \(Fo\fR\f(CB$SHELL\fR\fB \-c\fR\(Fc, for example when displaying the conffile differences. If \fBSHELL\fR is not set, \(Fo\fBsh\fR\(Fc will be used instead. The \fBDPKG_PAGER\fR overrides the \fBPAGER\fR environment variable (since dpkg 1.19.2). .IP \fBDPKG_COLORS\fR 4 .IX Item "DPKG_COLORS" Sets the color mode (since dpkg 1.18.5). The currently accepted values are: \fBauto\fR (default), \fBalways\fR and \&\fBnever\fR. .IP \fBDPKG_DEBUG\fR 4 .IX Item "DPKG_DEBUG" Sets the debug mask (since dpkg 1.21.10) from an octal value. The currently accepted flags are described in the \fB\-\-debug\fR option. .IP \fBDPKG_FORCE\fR 4 .IX Item "DPKG_FORCE" Sets the force flags (since dpkg 1.19.5). When this variable is present, no built-in force defaults will be applied. If the variable is present but empty, all force flags will be disabled. .IP \fBDPKG_ADMINDIR\fR 4 .IX Item "DPKG_ADMINDIR" If set and the \fB\-\-admindir\fR or \fB\-\-root\fR options have not been specified, it will be used as the \fBdpkg\fR administrative directory (since dpkg 1.20.0). .IP \fBDPKG_FRONTEND_LOCKED\fR 4 .IX Item "DPKG_FRONTEND_LOCKED" Set by a package manager frontend to notify dpkg that it should not acquire the frontend lock (since dpkg 1.19.1). .SS "Internal environment" .IX Subsection "Internal environment" .IP \fBLESS\fR 4 .IX Item "LESS" Defined by \fBdpkg\fR to \(lq\fB\-FRSXMQ\fR\(rq, if not already set, when spawning a pager (since dpkg 1.19.2). To change the default behavior, this variable can be preset to some other value including an empty string, or the \fBPAGER\fR or \fBDPKG_PAGER\fR variables can be set to disable specific options with \(Fo\fB\-+\fR\(Fc, for example \fBDPKG_PAGER="less \-+F"\fR. .IP \fBDPKG_ROOT\fR 4 .IX Item "DPKG_ROOT" Defined by \fBdpkg\fR on the maintainer script environment to indicate which installation to act on (since dpkg 1.18.5). The value is intended to be prepended to any path maintainer scripts operate on. During normal operation, this variable is empty. When installing packages into a different \fBinstdir\fR, \fBdpkg\fR normally invokes maintainer scripts using \fBchroot\fR\|(2) and leaves this variable empty, but if \fB\-\-force\-script\-chrootless\fR is specified then the \fBchroot\fR\|(2) call is skipped and \fBinstdir\fR is non-empty. .IP \fBDPKG_ADMINDIR\fR 4 .IX Item "DPKG_ADMINDIR" Defined by \fBdpkg\fR on the maintainer script environment to indicate the \fBdpkg\fR administrative directory to use (since dpkg 1.16.0). This variable is always set to the current \fB\-\-admindir\fR value. .IP \fBDPKG_FORCE\fR 4 .IX Item "DPKG_FORCE" Defined by \fBdpkg\fR on the subprocesses environment to all the currently enabled force option names separated by commas (since dpkg 1.19.5). .IP \fBDPKG_SHELL_REASON\fR 4 .IX Item "DPKG_SHELL_REASON" Defined by \fBdpkg\fR on the shell spawned on the conffile prompt to examine the situation (since dpkg 1.15.6). Current valid value: \fBconffile-prompt\fR. .IP \fBDPKG_CONFFILE_OLD\fR 4 .IX Item "DPKG_CONFFILE_OLD" Defined by \fBdpkg\fR on the shell spawned on the conffile prompt to examine the situation (since dpkg 1.15.6). Contains the path to the old conffile. .IP \fBDPKG_CONFFILE_NEW\fR 4 .IX Item "DPKG_CONFFILE_NEW" Defined by \fBdpkg\fR on the shell spawned on the conffile prompt to examine the situation (since dpkg 1.15.6). Contains the path to the new conffile. .IP \fBDPKG_HOOK_ACTION\fR 4 .IX Item "DPKG_HOOK_ACTION" Defined by \fBdpkg\fR on the shell spawned when executing a hook action (since dpkg 1.15.4). Contains the current \fBdpkg\fR action. .IP \fBDPKG_RUNNING_VERSION\fR 4 .IX Item "DPKG_RUNNING_VERSION" Defined by \fBdpkg\fR on the maintainer script environment to the version of the currently running \fBdpkg\fR instance (since dpkg 1.14.17). .IP \fBDPKG_MAINTSCRIPT_PACKAGE\fR 4 .IX Item "DPKG_MAINTSCRIPT_PACKAGE" Defined by \fBdpkg\fR on the maintainer script environment to the (non-arch-qualified) package name being handled (since dpkg 1.14.17). .IP \fBDPKG_MAINTSCRIPT_PACKAGE_REFCOUNT\fR 4 .IX Item "DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT" Defined by \fBdpkg\fR on the maintainer script environment to the package reference count, i.e. the number of package instances with a state greater than \fBnot-installed\fR (since dpkg 1.17.2). .IP \fBDPKG_MAINTSCRIPT_ARCH\fR 4 .IX Item "DPKG_MAINTSCRIPT_ARCH" Defined by \fBdpkg\fR on the maintainer script environment to the architecture the package got built for (since dpkg 1.15.4). .IP \fBDPKG_MAINTSCRIPT_NAME\fR 4 .IX Item "DPKG_MAINTSCRIPT_NAME" Defined by \fBdpkg\fR on the maintainer script environment to the name of the script running, one of \fBpreinst\fR, \fBpostinst\fR, \&\fBprerm\fR or \fBpostrm\fR (since dpkg 1.15.7). .IP \fBDPKG_MAINTSCRIPT_DEBUG\fR 4 .IX Item "DPKG_MAINTSCRIPT_DEBUG" Defined by \fBdpkg\fR on the maintainer script environment to a value (\(oq\fB0\fR\(cq or \(oq\fB1\fR\(cq) noting whether debugging has been requested (with the \fB\-\-debug\fR option) for the maintainer scripts (since dpkg 1.18.4). .SH FILES .IX Header "FILES" .IP \fI/etc/dpkg/dpkg.cfg.d/[0\-9a\-zA\-Z_\-]*\fR 4 .IX Item "/etc/dpkg/dpkg.cfg.d/[0-9a-zA-Z_-]*" Configuration fragment files (since dpkg 1.15.4). .IP \fI/etc/dpkg/dpkg.cfg\fR 4 .IX Item "/etc/dpkg/dpkg.cfg" Configuration file with default options. .IP \fI/var/log/dpkg.log\fR 4 .IX Item "/var/log/dpkg.log" Default log file (see \fI/etc/dpkg/dpkg.cfg\fR and option \&\fB\-\-log\fR). .PP The other files listed below are in their default directories, see option \&\fB\-\-admindir\fR to see how to change locations of these files. .IP \fI/var/lib/dpkg/available\fR 4 .IX Item "/var/lib/dpkg/available" List of available packages. .IP \fI/var/lib/dpkg/status\fR 4 .IX Item "/var/lib/dpkg/status" Statuses of available packages. This file contains information about whether a package is marked for removing or not, whether it is installed or not, etc. See section "INFORMATION ABOUT PACKAGES" for more info. .Sp The status file is backed up daily in \fI/var/backups\fR. It can be useful if it's lost or corrupted due to filesystems troubles. .PP The format and contents of a binary package are described in \fBdeb\fR\|(5). .SS "Filesystem filenames" .IX Subsection "Filesystem filenames" During unpacking and configuration \fBdpkg\fR uses various filenames for backup and rollback purposes. The following is a simplified explanation of how these filenames get used during package installation. .IP \fI*.dpkg\-new\fR 4 .IX Item "*.dpkg-new" During unpack, \fBdpkg\fR extracts new filesystem objects into \&\fIpathname\fR\fB.dpkg\-new\fR (except for existing directories or symlinks to directories which get skipped), once that is done and after having performed backups of the old objects, the objects get renamed to \fIpathname\fR. .IP \fI*.dpkg\-tmp\fR 4 .IX Item "*.dpkg-tmp" During unpack, \fBdpkg\fR makes backups of the old filesystem objects into \&\fIpathname\fR\fB.dpkg\-tmp\fR after extracting the new objects. These backups are performed as either a rename for directories (but only if they switch file type), a new symlink copy for symlinks, or a hard link for any other filesystem object, except for conffiles which get no backups because they are processed at a later stage. .Sp In case of needing to rollback, these backups get used to restore the previous contents of the objects. These get removed automatically after the installation is complete. .IP \fI*.dpkg\-old\fR 4 .IX Item "*.dpkg-old" During configuration, when installing a new version, \&\fBdpkg\fR can make a backup of the previous modified conffile into \&\fIpathname\fR\fB.dpkg\-old\fR. .IP \fI*.dpkg\-dist\fR 4 .IX Item "*.dpkg-dist" During configuration, when keeping the old version, \&\fBdpkg\fR can make a backup of the new unmodified conffile into \&\fIpathname\fR\fB.dpkg\-dist\fR. .SH SECURITY .IX Header "SECURITY" Any operation that needs write access to the database or the filesystem is considered a privileged operation that might allow root escalation. These operations must never be delegated to an untrusted user or be done on untrusted packages, as that might allow root access to the system. .PP Some operations (such as package verification) might need root privileges to be able to access files on the filesystem that would otherwise be inaccessible due to restricted permissions, but should otherwise work normally and produce appropriate messages in those cases. .PP Query operations should never require root, and delegating their execution to unprivileged users via some gain-root command can have security implications (such as privilege escalation), for example when a pager is automatically invoked by the tool. .PP See also the \fBSECURITY\fR section of the \fBdpkg\-deb\fR\|(1) and \fBdpkg\-split\fR\|(1) manual pages. .SH BUGS .IX Header "BUGS" \&\fB\-\-no\-act\fR usually gives less information than might be helpful. .SH EXAMPLES .IX Header "EXAMPLES" To list installed packages related to the editor \fBvi\fR\|(1) (note that \&\fBdpkg-query\fR does not load the \fIavailable\fR file anymore by default, and the \fBdpkg-query\fR \fB\-\-load\-avail\fR option should be used instead for that): .Sp .Vb 1 \& dpkg \-l \*(Aq*vi*\*(Aq .Ve .PP To see the entries in \fI/var/lib/dpkg/available\fR of two packages: .Sp .Vb 1 \& dpkg \-\-print\-avail vim neovim | less .Ve .PP To search the listing of packages yourself: .Sp .Vb 1 \& dpkg \-\-print\-avail | less .Ve .PP To remove an installed neovim package: .Sp .Vb 1 \& dpkg \-r neovim .Ve .PP To install a package, you first need to find it in an archive or media disc. When using an archive based on a pool structure, knowing the archive area and the name of the package is enough to infer the pathname: .Sp .Vb 1 \& dpkg \-i /media/bdrom/pool/main/v/vim/vim_9.0.2018\-1_amd64.deb .Ve .PP To make a local copy of the package selection states: .Sp .Vb 1 \& dpkg \-\-get\-selections >myselections .Ve .PP You might transfer this file to another computer, and after having updated the \fIavailable\fR file there with your package manager frontend of choice (see for more details), for example: .Sp .Vb 1 \& apt\-cache dumpavail | dpkg \-\-merge\-avail .Ve .PP you can install it with: .Sp .Vb 2 \& dpkg \-\-clear\-selections \& dpkg \-\-set\-selections