| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572 |
- .\" Hey Emacs! This file is -*- nroff -*- source.
- .TH DPKG 8 "April 12, 1998" "Debian Project" "Debian GNU/Linux"
- .SH NAME
- dpkg - a medium-level package manager for Debian GNU/Linux
- .SH SYNOPSIS
- .B dpkg
- [\fIoptions\fP] \fIaction\fP
- .SH WARNING
- This manual is intended for users wishing to understand \fBdpkg\fP's
- command line options and package states in more detail than that
- provided by \fBdpkg --help\fP.
- It should \fInot\fP be used by package maintainers wishing to
- understand how \fBdpkg\fP will install their packages. The
- descriptions of what \fBdpkg\fP does when installing and removing
- packages are particularly inadequate. For detailed information about
- this, please refer to the \fIPackage Management System\fP topic under
- \fIdebian-faq\fP in the GNU Info system. For information about
- creating Debian packages, see the \fIDebian Package Management
- Tools\fP topic in the same place.
- .SH DESCRIPTION
- \fBdpkg\fP is a medium-level tool to install, build, remove and manage
- Debian GNU/Linux packages. The primary and more user-friendly
- front-end for \fBdpkg\fP is \fBdselect\fP(8). \fBdpkg\fP itself is
- controlled entirely via command line parameters, which consist of exactly
- one action and zero or more options. The action-parameter tells dpkg
- what to do and options control the behavior of the action in some way.
- \fBdpkg\fP can be also be used as a front-end to \fBdpkg-deb\fP.
- The following
- are \fBdpkg-deb\fP actions, and if they are encountered, \fBdpkg\fP
- just runs \fBdpkg-deb\fP with the parameters given to it:
- .nf
- \fB-b\fP, \fB--build\fP,
- \fB-c\fP, \fB--contents\fP,
- \fB-I\fP, \fB--info\fP,
- \fB-f\fP, \fB--field\fP,
- \fB-e\fP, \fB--control\fP,
- \fB-x\fP, \fB--extract\fP,
- \fB-X\fP, \fB--vextract\fP, and
- \fB--fsys-tarfile\fP.
- .fi
- Please refer to \fBdpkg-deb\fP(8) for information about these actions.
- .SH INFORMATION ABOUT PACKAGES
- \fBdpkg\fP maintains some usable information about available
- packages. The information is divided in three classes: \fBstates\fP,
- \fBselection states\fP and \fBflags\fP. These values are intended to
- be changed mainly with \fBdselect\fP.
- .SS PACKAGE STATES
- .TP
- .B installed
- The package is unpacked and configured OK.
- .TP
- .B half-installed
- The installation of the package has been started, but not completed for
- some reason.
- .TP
- .B not-installed
- The package is not installed on your system.
- .TP
- .B unpacked
- The package is unpacked, but not configured.
- .TP
- .B half-configured
- The package is unpacked and configuration has been started, but not yet
- completed for some reason.
- .TP
- .B config-files
- Only the configuration files of the package exist on the system.
- .SS PACKAGE SELECTION STATES
- .TP
- .B install
- The package is selected for installation.
- .TP
- .B deinstall
- The package is selected for deinstallation (i.e. we want to remove all
- files, except configuration files).
- .TP
- .B purge
- The package is selected to be purged (i.e. we want to remove everything,
- even configuration files).
- .SS PACKAGE FLAGS
- .TP
- .B hold
- A package marked to be on \fBhold\fP is not handled by \fBdpkg\fP,
- unless forced to do that with option \fB--force-hold\fP.
- .TP
- .B reinst-required
- A package marked \fBreinst-required\fP is broken and requires
- reinstallation. These packages cannot be removed, unless forced with
- option \fB--force-reinstreq\fP.
- .SH ACTIONS
- .TP
- \fBdpkg -i\fP | \fB--install\fP \fIpackage_file\fP...
- Install the package. If \fB--recursive\fP or \fB-R\fP option is
- specified, \fIpackage_file\fP must refer to a directory instead.
- Installation consists of the following steps:
- .br
- \fB1.\fP Extract the control files of the new package.
- .br
- \fB2.\fP If another version of the same package was installed before
- the new installation, execute \fIprerm\fP script of the old package.
- .br
- \fB3.\fP Run \fIpreinst\fP script, if provided by the package.
- .br
- \fB4.\fP Unpack the new files, and at the same time back up the old
- files, so that if something goes wrong, they can be restored.
- .br
- \fB5.\fP If another version of the same package was installed before
- the new installation, execute the \fIpostrm\fP script of the old
- package. Note that this script is executed after the \fIpreinst\fP
- script of the new package, because new files are written at the same
- time old files are removed.
- .br
- \fB6.\fP Configure the package. See \fB--configure\fP for detailed
- information about how this is done.
- .TP
- \fBdpkg --unpack \fP\fIpackage_file\fP ...
- Unpack the package, but don't configure it. If \fB--recursive\fP or
- \fB-R\fP option is specified, \fIpackage_file\fP must refer to a
- directory instead.
- .TP
- \fBdpkg --configure \fP\fIpackage\fP ... | \fB-a\fP | \fB--pending\fP
- Reconfigure an unpacked package. If \fB-a\fP or \fB--pending\fP is
- given instead of \fIpackage\fP, all unpacked but unconfigured
- packages are configured.
- Configuring consists of the following steps:
- .br
- \fB1.\fP Unpack the configuration files, and at the same time back up
- the old configuration files, so that they can be restored if
- something goes wrong.
- .br
- \fB2.\fP Run \fIpostinst\fP script, if provided by the package.
- .TP
- \fBdpkg -r\fP | \fB--remove\fP | \fB-P\fP | \fB--purge \fP\fIpackage\fP ... | \fB-a\fP | \fB--pending\fP
- Remove an installed package. \fB-r\fP or \fB--remove\fP remove
- everything except configuration files. This may avoid having to
- reconfigure the package if it is reinstalled later. (Configuration
- files are the files listed in the \fIdebian/conffiles\fP control
- file). \fB-P\fP or \fB--purge\fP removes everything, including configuration
- files. If \fB-a\fP or \fB--pending\fP is given instead of a package
- name, then all packages unpacked, but marked to be removed or purged
- in file \fI/var/lib/dpkg/status\fP, are removed or purged,
- respectively.
- Removing of a package consists of the following steps:
- .br
- \fB1.\fP Run \fIprerm\fP script
- .br
- \fB2.\fP Remove the installed files
- .br
- \fB3.\fP Run \fIpostrm\fP script
- .br
- .TP
- .BI "dpkg -p|--print-avail " package
- Display details about \fIpackage\fP, as found in
- \fI/var/lib/dpkg/available\fP.
- .TP
- \fBdpkg --update-avail\fP | \fB--merge-avail\fP \fIPackages-file\fP
- Update \fBdpkg\fP's and \fBdselect\fP's idea of which packages are
- available. With action \fB--merge-avail\fP, old information is
- combined with information from \fIPackages-file\fP. With action
- \fB--update-avail\fP, old information is replaced with the information
- in the \fIPackages-file\fP. The \fIPackages-file\fP distributed with
- Debian GNU/Linux is simply named \fIPackages\fP. \fBdpkg\fP keeps its
- record of available packages in \fI/var/lib/dpkg/available\fP.
- .TP
- \fBdpkg -A\fP | \fB--record-avail\fP \fIpackage_file\fP ...
- Update \fBdpkg\fP and \fBdselect\fP's idea of which packages are
- available with information from the package \fIpackage_file\fP. If
- \fB--recursive\fP or \fB-R\fP option is specified, \fIpackage_file\fP
- must refer to a directory instead.
- .TP
- .B dpkg --forget-old-unavail
- Forget about uninstalled unavailable packages.
- .TP
- .B dpkg --clear-avail
- Erase the existing information about what packages are available.
- .TP
- \fBdpkg -l\fP | \fB--list\fP \fIpackage-name-pattern\fP ...
- List packages matching given pattern. If no \fIpackage-name-pattern\fP
- is given, list all packages in \fI/var/lib/dpkg/available\fP. Normal
- shell wildchars are allowed in \fIpackage-name-pattern\fP. (You will
- probably have to quote \fIpackage-name-pattern\fP to prevent the shell
- from performing filename expansion. For example, \fBdpkg -l 'libc5*'\fP will list all the package names starting with "libc5".)
- .TP
- \fBdpkg -s\fP | \fB--status\fP \fIpackage-name\fP ...
- Report status of specified package. This just displays the entry in
- the installed package status database.
- .TP
- \fBdpkg -C\fP | \fB--audit\fP
- Searches for packages that have been installed only partially on your
- system. \fBdpkg\fP will suggest what to do with them to get them
- working.
- .TP
- \fBdpkg --get-selections\fP [\fIpattern\fP...]
- Get list of package selections, and write it to stdout.
- .TP
- .B dpkg --set-selections
- Set package selections using file read from stdin.
- .TP
- .B dpkg --yet-to-unpack
- Searches for packages selected for installation, but which for some
- reason still haven't been installed.
- .TP
- \fBdpkg -L\fP | \fB--listfiles\fP \fIpackage\fP ...
- List files installed to your system from \fBpackage\fP.
- However, note that files created by package-specific
- installation-scripts are not listed.
- .TP
- \fBdpkg -S\fP | \fB--search\fP \fIfilename-search-pattern\fP ...
- Search for a filename from installed packages. All standard shell
- wildchars can be used in the pattern.
- .TP
- .B dpkg --print-architecture
- Print target architecture (for example, "i386"). This option uses
- \fBgcc\fP.
- .TP
- .B dpkg --print-gnu-build-architecture
- Print GNU version of target architecture (for example, "i486").
- .TP
- .B dpkg --print-installation-architecture
- Print host architecture for installation.
- .TP
- .B dpkg --compare-versions \fIver1 op ver2\fP
- Compare version numbers, where \fIop\fP is a binary operator. \fBdpkg\fP
- returns success (zero result) if the specified condition is satisfied,
- and failure (nonzero result) otherwise. There are
- two groups of operators, which differ in how they treat a missing
- \fIver1\fP or \fIver2\fP. These treat no version as earlier than any
- version: \fBlt le eq ne ge gt\fP. These treat no version as later
- than any version: \fBlt-nl le-nl ge-nl gt-nl\fP. These are provided
- only for compatibility with control file syntax: \fB< << <= = >= >>
- >\fP.
- .TP
- .B dpkg --help
- Display a brief help message.
- .TP
- .B dpkg --force-help
- Give help about the \fB--force-\fP\fIthing\fP options.
- .TP
- .BR "dpkg -Dh " | " --debug=help"
- Give help about debugging options.
- .TP
- \fBdpkg --licence\fP | \fBdpkg --license\fP
- Display \fBdpkg\fP licence.
- .TP
- \fBdpkg --version\fP
- Display \fBdpkg\fP version information.
- .TP
- \fBdpkg-deb-actions\fP
- See \fBdpkg-deb\fP(8) for more information about the following actions.
- .nf
- \fBdpkg -b\fP | \fB--build\fP \fIdirectory\fP [\fIfilename\fP]
- Build a Debian GNU/Linux package.
- \fBdpkg -c\fP | \fB--contents\fP \fIfilename\fP
- List contents of Debian GNU/Linux package.
- \fBdpkg -e\fP | \fB--control\fP \fIfilename\fP [\fIdirectory\fP]
- Extract control-information from a package.
- \fBdpkg -x\fP | \fB--extract\fP \fIfilename directory\fP
- Extract the files contained by package.
- \fBdpkg -f\fP | \fB--field\fP \fIfilename\fP [\fIcontrol-field\fP] ...
- Display control field(s) of a package.
- \fBdpkg --fsys-tarfile\fP \fIfilename\fP
- Display the filesystem tar-file contained by a
- Debian package.
- \fBdpkg -I\fP | \fB--info\fP \fIfilename\fP [\fIcontrol-file\fP]
- Show information about a package.
- \fBdpkg -X\fP | \fB--vextract\fP \fIfilename\fP \fIdirectory\fP
- Extract and display the filenames contained by a
- package.
- .fi
- .SH OPTIONS
- .br
- .TP
- \fB--abort-after=\fP\fInumber\fP
- Change after how many errors dpkg will abort. The default is 50.
- .TP
- .BR -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.
- .TP
- \fB-D\fIoctal\fP | \fB--debug=\fP\fIoctal\fP
- Set debugging on. \fIoctal\fP is formed by bitwise-orring desired
- values together from the list below (note that these values may change
- in future releases). \fB-Dh\fP or \fB--debug=help\fP display these
- debugging values.
- 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
- 1000 Lots of drivel about e.g. the dpkg/info dir
- 2000 Insane amounts of drivel
- .TP
- \fB--force-\fP\fIthings\fP | \fB--no-force-\fP\fIthings\fP | \fB--refuse-\fP\fIthings\fP
- Force or refuse (\fBno-force\fP and \fBrefuse\fP mean the same thing)
- to do some things. \fIthings\fP is a comma separated list of things
- specified below. \fB--force-help\fP displays a message describing them.
- Things marked with (*) are forced by default.
- \fIWarning: These options are mostly intended to be used by experts
- only. Using them without fully understanding their effects may break
- your whole system.\fP
- \fBauto-select\fP(*):
- Select packages to install them, and deselect packages to remove them.
- \fBdowngrade\fP(*):
- Install a package, even if newer version of it is already installed.
- \fBconfigure-any\fP:
- Configure also any unpacked but unconfigured packages on which the current
- package depends.
- \fBhold\fP:
- Process packages even when marked "hold".
- \fBremove-reinstreq\fP:
- 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\fP.
- \fBremove-essential\fP:
- Remove, even if the package is considered essential. Essential
- packages contain mostly very basic Unix commands. Removing them might
- cause the whole system to stop working, so use with caution.
- \fBdepends\fP:
- Turn all dependency problems into warnings.
- \fBdepends-version\fP:
- Don't care about versions when checking dependencies.
- \fBconflicts\fP:
- Install, even if it conflicts with another package. This is dangerous,
- for it will usually cause overwriting of some files.
- \fBconfnew\fP:
- If a conffile has been modified always install the new version without
- prompting.
- \fBconfold\fP:
- If a conffile has been modified always keep the old version without prompting.
- \fBconfdef\fP:
- If a conffile has been modified always choose the default action. If
- \fB--force-confnew\fP or \fB--force-confold\fP have also been given
- always default. If there is no default then we use the old or new
- version, depending on the option given.
- \fBoverwrite\fP(*):
- Overwrite one package's file with another's file.
- \fBoverwrite-dir\fP
- Overwrite one package's directory with another's file.
- \fBoverwrite-diverted\fP:
- Overwrite a diverted file with an undiverted version.
- \fBarchitecture\fP:
- Process even packages with the wrong architecture.
- \fBbad-path\fP:
- \fBPATH\fP is missing important programs, so problems are likely.
- \fBnot-root\fP:
- Try to (de)install things even when not root.
- .TP
- \fB--ignore-depends\fP=\fIpackage\fP,...
- Ignore dependency-checking for specified packages (actually, checking is
- performed, but only warnings about conflicts are given, nothing else).
- .TP
- \fB--largemem\fP | \fB--smallmem\fP
- Tells \fBdpkg\fP whether to preserve memory (e.g. with less than 4 MB
- of RAM) or consume as much as needed.
- .TP
- \fB--new\fP | \fB--old\fP
- Select new or old binary package format. This is a \fBdpkg-deb\fP(8)
- option.
- .TP
- .B --nocheck
- Don't read or check contents of control file while building a package.
- This is a \fBdpkg-deb\fP(8) option.
- .TP
- .B --no-act
- 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.
- Be sure to give \fB--no-act\fP before the action-parameter, or you might
- end up with undesirable results. (e.g. \fBdpkg --purge foo
- --no-act\fP will first purge package foo and then try to purge package
- --no-act, even though you probably expected it to actually do nothing)
- .TP
- \fB-R\fP | \fB--recursive\fP
- Recursively handle all regular files matching pattern \fB*.deb\fP
- found at specified directories and all of its subdirectories. This can
- be used with \fB-i\fP, \fB-A\fP, \fB--install\fP, \fB--unpack\fP and
- \fB--avail\fP actions.
- .TP
- \fB-G\fP
- Don't install a package if a newer version of the same package is already
- installed. This is an alias of \fB--refuse-downgrade.\fP
- .TP
- \fB-R\fP | \fB--root=\fP\fIdir\fP | \fB--admindir=\fP\fIdir\fP | \fB--instdir=\fP\fIdir\fP
- Change default directories. \fBadmindir\fP defaults to
- \fI/var/lib/dpkg\fP and contains many files that give information
- about status of installed or uninstalled packages, etc. \fBinstdir\fP
- defaults to \fI/\fP and refers to the directory where packages are to
- be installed. \fBinstdir\fP is also the directory passed to
- \fBchroot\fP(2) before running \fIpackage\fP's installation scripts, which
- means that the scripts see \fBinstdir\fP as a root directory.
- Changing \fBroot\fP changes \fBinstdir\fP to \fIdir\fP and
- \fBadmindir\fP to \fIdir\fP\fB/var/lib/dpkg\fP.
- .TP
- \fB-O\fP | \fB--selected-only\fP
- Only process the packages that are selected for installation. The
- actual marking is done with \fBdselect\fP or by \fBdpkg\fP, when it
- handles packages. For example, when a package is removed, it will
- be marked selected for installation.
- .TP
- .BR -E " | " --skip-same-version
- Don't install the package if the same version of the package is already
- installed.
- .SH FILES
- The files listed here are in their default directories, see option
- \fB--admindir\fP to see how to change locations of these files.
- .TP
- .I /var/lib/dpkg/available
- List of available packages.
- .TP
- .I /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 \fBINFORMATION ABOUT PACKAGES\fP
- for more info.
- .P
- The following files are components of a binary package. See \fBdeb\fP(5)
- for more information about them:
- .TP
- .I control
- .TP
- .I conffiles
- .TP
- .I preinst
- .TP
- .I postinst
- .TP
- .I prerm
- .TP
- .I postrm
- .SH ENVIRONMENT VARIABLES
- .TP
- .B DPKG_NO_TSTP
- Define this to something if you prefer \fBdpkg\fP starting a new
- shell rather than suspending \fBdpkg\fP, while doing a shell escape.
- .TP
- .B SHELL
- The program \fBdpkg\fP will execute while starting a new shell.
- .SH EXAMPLES
- To list packages related to the editor vi:
- .br
- \fB dpkg -l '*vi*'\fP
- .br
- To see the entries in \fI/var/lib/dpkg/available\fP on two packages:
- .br
- \fB dpkg --print-avail elvis vim | less\fP
- .br
- To search the listing of packages yourself:
- .br
- \fB less /var/lib/dpkg/available\fP
- .br
- To remove an installed elvis package:
- .br
- \fB dpkg -r elvis\fP
- .br
- To install a package, you first need to find it in an archive or
- CDROM. The "available" file shows that the vim package is in section
- "editors":
- .br
- \fB cd /cdrom/hamm/hamm/binary/editors\fP
- \fB dpkg -i vim_4.5-3.deb\fP
- .br
- To make a local copy of the package selection states:
- .br
- \fB dpkg --get-selections >myselections\fP
- .br
- You might transfer this file to another computer, and install it there
- with:
- .br
- \fB dpkg --set-selections <myselections\fP
- .br
- Ordinarily, you will find that \fBdselect\fP(8) provides a more
- convenient way to modify the package selection states.
- .br
- .SH SEE ALSO
- \fBdselect\fP(8),
- \fBdpkg-deb\fP(1),
- \fBdeb\fP(5),
- and
- \fBdeb-control\fP(5)
- .SH BUGS
- \fB--no-act\fP usually gives less information than might be helpful.
- .SH AUTHORS
- .nf
- Contributions to \fBdpkg\fP have been made by:
- Ian Jackson <ian@davenant.greenend.org.uk>
- Wichert Akkerman <wakkerma@debian.org>
- Ben Collins <bcollins@debian.org>
- Nils Rennebarth <nils@debian.org>
- Miquel van Smoorenburg <miquels@cistron.nl>
- Juan Cespedes <cespedes@debian.org>
- Juho Vuori <javuori@cc.helsinki.fi>
- Charles Briscoe-Smith <cpbs@debian.org>
- Erick Branderhorst <branderhorst@heel.fgg.eur.nl>
- Miquel van Smoorenburg <miquels@cistron.nl>
- Kim-Minh Kaplan <kkaplan@cdfhp3.in2p3.fr>
- Michael Shields <shields@crosslink.net>
- Bruce Perens <bruce@pixar.com>
- Carl Streeter <streeter@cae.wisc.edu>
- Matt Welsh <mdw@sunsite.unc.edu>
- Ian Murdock <imurdock@debian.org>
- Colin Plumb
- Branko Lankester
- .fi
- The manual page was written by Juho Vuori
- <javuori@cc.helsinki.fi> and updated by Jim Van Zandt
- <jrv@vanzandt.mv.com>.
|