dpkg.1 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990
  1. .\" dpkg manual page - dpkg(1)
  2. .\"
  3. .\" Copyright © 1996 Juho Vuori <javuori@cc.helsinki.fi>
  4. .\" Copyright © 1999 Jim Van Zandt <jrv@vanzandt.mv.com>
  5. .\" Copyright © 1999-2003 Wichert Akkerman <wakkerma@debian.org>
  6. .\" Copyright © 2000-2003 Adam Heath <doogie@debian.org>
  7. .\" Copyright © 2002 Josip Rodin
  8. .\" Copyright © 2004-2005 Scott James Remnant <keybuk@debian.org>
  9. .\" Copyright © 2006-2015 Guillem Jover <guillem@debian.org>
  10. .\" Copyright © 2007-2008 Ian Jackson <ian@davenant.greenend.org.uk>
  11. .\" Copyright © 2008-2011 Raphaël Hertzog <hertzog@debian.org>
  12. .\"
  13. .\" This is free software; you can redistribute it and/or modify
  14. .\" it under the terms of the GNU General Public License as published by
  15. .\" the Free Software Foundation; either version 2 of the License, or
  16. .\" (at your option) any later version.
  17. .\"
  18. .\" This is distributed in the hope that it will be useful,
  19. .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. .\" GNU General Public License for more details.
  22. .\"
  23. .\" You should have received a copy of the GNU General Public License
  24. .\" along with this program. If not, see <https://www.gnu.org/licenses/>.
  25. .
  26. .TH dpkg 1 "2014-08-16" "Debian Project" "dpkg suite"
  27. .SH NAME
  28. dpkg \- package manager for Debian
  29. .
  30. .SH SYNOPSIS
  31. .B dpkg
  32. .RI [ option "...] " action
  33. .
  34. .SH WARNING
  35. This manual is intended for users wishing to understand \fBdpkg\fP's
  36. command line options and package states in more detail than that
  37. provided by \fBdpkg \-\-help\fP.
  38. It should \fInot\fP be used by package maintainers wishing to
  39. understand how \fBdpkg\fP will install their packages. The
  40. descriptions of what \fBdpkg\fP does when installing and removing
  41. packages are particularly inadequate.
  42. .
  43. .SH DESCRIPTION
  44. \fBdpkg\fP is a tool to install, build, remove and manage
  45. Debian packages. The primary and more user-friendly
  46. front-end for \fBdpkg\fP is \fBaptitude\fP(1). \fBdpkg\fP itself is
  47. controlled entirely via command line parameters, which consist of exactly
  48. one action and zero or more options. The action-parameter tells \fBdpkg\fP
  49. what to do and options control the behavior of the action in some way.
  50. \fBdpkg\fP can also be used as a front-end to \fBdpkg\-deb\fP(1) and
  51. \fBdpkg\-query\fP(1). The list of supported actions can be found later on
  52. in the \fBACTIONS\fP section. If any such action is encountered \fBdpkg\fP
  53. just runs \fBdpkg\-deb\fP or \fBdpkg\-query\fP with the parameters given
  54. to it, but no specific options are currently passed to them, to use
  55. any such option the back-ends need to be called directly.
  56. .
  57. .SH INFORMATION ABOUT PACKAGES
  58. \fBdpkg\fP maintains some usable information about available
  59. packages. The information is divided in three classes: \fBstates\fP,
  60. \fBselection states\fP and \fBflags\fP. These values are intended to
  61. be changed mainly with \fBdselect\fP.
  62. .SS Package states
  63. .TP
  64. .B not\-installed
  65. The package is not installed on your system.
  66. .TP
  67. .B config\-files
  68. Only the configuration files of the package exist on the system.
  69. .TP
  70. .B half\-installed
  71. The installation of the package has been started, but not completed for
  72. some reason.
  73. .TP
  74. .B unpacked
  75. The package is unpacked, but not configured.
  76. .TP
  77. .B half\-configured
  78. The package is unpacked and configuration has been started, but not yet
  79. completed for some reason.
  80. .TP
  81. .B triggers\-awaited
  82. The package awaits trigger processing by another package.
  83. .TP
  84. .B triggers\-pending
  85. The package has been triggered.
  86. .TP
  87. .B installed
  88. The package is correctly unpacked and configured.
  89. .SS Package selection states
  90. .TP
  91. .B install
  92. The package is selected for installation.
  93. .TP
  94. .B hold
  95. A package marked to be on \fBhold\fP is not handled by \fBdpkg\fP,
  96. unless forced to do that with option \fB\-\-force\-hold\fP.
  97. .TP
  98. .B deinstall
  99. The package is selected for deinstallation (i.e. we want to remove all
  100. files, except configuration files).
  101. .TP
  102. .B purge
  103. The package is selected to be purged (i.e. we want to remove everything
  104. from system directories, even configuration files).
  105. .SS Package flags
  106. .TP
  107. .B reinst\-required
  108. A package marked \fBreinst\-required\fP is broken and requires
  109. reinstallation. These packages cannot be removed, unless forced with
  110. option \fB\-\-force\-remove\-reinstreq\fP.
  111. .
  112. .SH ACTIONS
  113. .TP
  114. \fB\-i\fP, \fB\-\-install\fP \fIpackage-file\fP...
  115. Install the package. If \fB\-\-recursive\fP or \fB\-R\fP option is
  116. specified, \fIpackage-file\fP must refer to a directory instead.
  117. Installation consists of the following steps:
  118. .br
  119. \fB1.\fP Extract the control files of the new package.
  120. .br
  121. \fB2.\fP If another version of the same package was installed before
  122. the new installation, execute \fIprerm\fP script of the old package.
  123. .br
  124. \fB3.\fP Run \fIpreinst\fP script, if provided by the package.
  125. .br
  126. \fB4.\fP Unpack the new files, and at the same time back up the old
  127. files, so that if something goes wrong, they can be restored.
  128. .br
  129. \fB5.\fP If another version of the same package was installed before
  130. the new installation, execute the \fIpostrm\fP script of the old
  131. package. Note that this script is executed after the \fIpreinst\fP
  132. script of the new package, because new files are written at the same
  133. time old files are removed.
  134. .br
  135. \fB6.\fP Configure the package. See \fB\-\-configure\fP for detailed
  136. information about how this is done.
  137. .TP
  138. \fB\-\-unpack \fP\fIpackage-file\fP...
  139. Unpack the package, but don't configure it. If \fB\-\-recursive\fP or
  140. \fB\-R\fP option is specified, \fIpackage-file\fP must refer to a
  141. directory instead.
  142. .TP
  143. \fB\-\-configure \fP\fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  144. Configure a package which has been unpacked but not yet configured.
  145. If \fB\-a\fP or \fB\-\-pending\fP is given instead of \fIpackage\fP,
  146. all unpacked but unconfigured packages are configured.
  147. To reconfigure a package which has already been configured, try the
  148. .BR dpkg\-reconfigure (8)
  149. command instead.
  150. Configuring consists of the following steps:
  151. .br
  152. \fB1.\fP Unpack the conffiles, and at the same time back up
  153. the old conffiles, so that they can be restored if
  154. something goes wrong.
  155. .br
  156. \fB2.\fP Run \fIpostinst\fP script, if provided by the package.
  157. .TP
  158. \fB\-\-triggers\-only\fP \fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  159. Processes only triggers (since dpkg 1.14.17).
  160. All pending triggers will be processed.
  161. If package
  162. names are supplied only those packages' triggers will be processed, exactly
  163. once each where necessary. Use of this option may leave packages in the
  164. improper \fBtriggers\-awaited\fP and \fBtriggers\-pending\fP states. This
  165. can be fixed later by running: \fBdpkg \-\-configure \-\-pending\fP.
  166. .TP
  167. \fB\-r\fP, \fB\-\-remove\fP \fP\fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  168. Remove an installed package. This removes everything except conffiles,
  169. which may avoid having to reconfigure the package if it is reinstalled
  170. later (conffiles are configuration files that are listed in the
  171. \fIDEBIAN/conffiles\fP control file).
  172. If \fB\-a\fP or \fB\-\-pending\fP is given instead of a package name,
  173. then all packages unpacked, but marked to be removed in file
  174. \fI/var/lib/dpkg/status\fP, are removed.
  175. Removing of a package consists of the following steps:
  176. .br
  177. \fB1.\fP Run \fIprerm\fP script
  178. .br
  179. \fB2.\fP Remove the installed files
  180. .br
  181. \fB3.\fP Run \fIpostrm\fP script
  182. .br
  183. .TP
  184. \fB\-P\fP, \fB\-\-purge \fP\fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  185. Purge an installed or already removed package. This removes everything,
  186. including conffiles.
  187. If \fB\-a\fP or \fB\-\-pending\fP is given instead of a package name,
  188. then all packages unpacked or removed, but marked to be purged in file
  189. \fI/var/lib/dpkg/status\fP, are purged.
  190. Note: some configuration files might be unknown to \fBdpkg\fP because they
  191. are created and handled separately through the configuration scripts. In
  192. that case, \fBdpkg\fP won't remove them by itself, but the package's
  193. \fIpostrm\fP script (which is called by \fBdpkg\fP), has to take care of
  194. their removal during purge. Of course, this only applies to files in
  195. system directories, not configuration files written to individual users'
  196. home directories.
  197. Purging of a package consists of the following steps:
  198. .br
  199. \fB1.\fP Remove the package, if not already removed. See \fB\-\-remove\fP
  200. for detailed information about how this is done.
  201. .br
  202. \fB2.\fP Run \fIpostrm\fP script.
  203. .br
  204. .TP
  205. .BR \-V ", " \-\-verify " [\fIpackage-name\fP...]
  206. Verifies the integrity of \fIpackage-name\fP or all packages if omitted,
  207. by comparing information from the files installed by a package with the
  208. files metadata information stored in the \fBdpkg\fP database
  209. (since dpkg 1.17.2).
  210. The origin
  211. of the files metadata information in the database is the binary packages
  212. themselves. That metadata gets collected at package unpack time during
  213. the installation process.
  214. Currently the only functional check performed is an md5sum verification
  215. against the stored value in the files database. It will only get checked
  216. if the database contains the file md5sum. To check for any missing
  217. metadata in the database, the \fB\-\-audit\fP command can be used.
  218. The output format is selectable with the \fB\-\-verify\-format\fP
  219. option, which by default uses the \fBrpm\fP format, but that might
  220. change in the future, and as such, programs parsing this command
  221. output should be explicit about the format they expect.
  222. .TP
  223. .BR \-\-update\-avail " [\fIPackages-file\fP]"
  224. .TQ
  225. .BR \-\-merge\-avail " [\fIPackages-file\fP]"
  226. Update \fBdpkg\fP's and \fBdselect\fP's idea of which packages are
  227. available. With action \fB\-\-merge\-avail\fP, old information is
  228. combined with information from \fIPackages-file\fP. With action
  229. \fB\-\-update\-avail\fP, old information is replaced with the information
  230. in the \fIPackages-file\fP. The \fIPackages-file\fP distributed with
  231. Debian is simply named \fIPackages\fP. If the \fIPackages-file\fP
  232. argument is missing or named \fB-\fP then it will be read from
  233. standard input (since dpkg 1.17.7). \fBdpkg\fP keeps its record of
  234. available packages in \fI/var/lib/dpkg/available\fP.
  235. A simpler one-shot command to retrieve and update the \fIavailable\fR
  236. file is \fBdselect update\fR. Note that this file is mostly useless
  237. if you don't use \fBdselect\fR but an APT-based frontend: APT has its
  238. own system to keep track of available packages.
  239. .TP
  240. \fB\-A\fP, \fB\-\-record\-avail\fP \fIpackage-file\fP...
  241. Update \fBdpkg\fP and \fBdselect\fP's idea of which packages are
  242. available with information from the package \fIpackage-file\fP. If
  243. \fB\-\-recursive\fP or \fB\-R\fP option is specified, \fIpackage-file\fP
  244. must refer to a directory instead.
  245. .TP
  246. .B \-\-forget\-old\-unavail
  247. Now \fBobsolete\fP and a no-op as \fBdpkg\fP will automatically forget
  248. uninstalled unavailable packages (since dpkg 1.15.4).
  249. .TP
  250. .B \-\-clear\-avail
  251. Erase the existing information about what packages are available.
  252. .TP
  253. .BR \-C ", " \-\-audit " [\fIpackage-name\fP...]
  254. Performs database sanity and consistency checks for \fIpackage-name\fP
  255. or all packages if omitted (per package checks since dpkg 1.17.10).
  256. For example, searches for packages that have been installed only partially
  257. on your system or that have missing, wrong or obsolete control data or
  258. files. \fBdpkg\fP will suggest what to do with them to get them fixed.
  259. .TP
  260. \fB\-\-get\-selections\fP [\fIpackage-name-pattern\fP...]
  261. Get list of package selections, and write it to stdout. Without a pattern,
  262. non-installed packages (i.e. those which have been previously purged) will
  263. not be shown.
  264. .TP
  265. .B \-\-set\-selections
  266. Set package selections using file read from stdin. This file should be
  267. in the format \(lq\fIpackage\fP \fIstate\fP\(rq, where state is one of
  268. \fBinstall\fP, \fBhold\fP, \fBdeinstall\fP or \fBpurge\fP. Blank lines
  269. and comment lines beginning with \(oq#\(cq are also permitted.
  270. The \fIavailable\fP file needs to be up-to-date for this command to be
  271. useful, otherwise unknown packages will be ignored with a warning. See
  272. the \fB\-\-update\-avail\fP and \fB\-\-merge\-avail\fP commands for more
  273. information.
  274. .TP
  275. .B \-\-clear\-selections
  276. Set the requested state of every non-essential package to deinstall
  277. (since dpkg 1.13.18).
  278. This is intended to be used immediately before \fB\-\-set\-selections\fP,
  279. to deinstall any packages not in list given to \fB\-\-set\-selections\fP.
  280. .TP
  281. .B \-\-yet\-to\-unpack
  282. Searches for packages selected for installation, but which for some
  283. reason still haven't been installed.
  284. .TP
  285. .B \-\-predep\-packages
  286. Print a single package which is the target of one or more relevant
  287. pre-dependencies and has itself no unsatisfied pre-dependencies.
  288. .IP
  289. If such a package is present, output it as a Packages file entry,
  290. which can be massaged as appropriate.
  291. .IP
  292. Returns 0 when a package is printed, 1 when no suitable package is
  293. available and 2 on error.
  294. .TP
  295. .B \-\-add\-architecture \fIarchitecture\fP
  296. Add \fIarchitecture\fP to the list of architectures for which packages can
  297. be installed without using \fB\-\-force\-architecture\fP (since dpkg 1.16.2).
  298. The architecture
  299. \fBdpkg\fP is built for (i.e. the output of \fB\-\-print\-architecture\fP)
  300. is always part of that list.
  301. .TP
  302. .B \-\-remove\-architecture \fIarchitecture\fP
  303. Remove \fIarchitecture\fP from the list of architectures for which packages
  304. can be installed without using \fB\-\-force\-architecture\fP
  305. (since dpkg 1.16.2). If the
  306. architecture is currently in use in the database then the operation will
  307. be refused, except if \fB\-\-force\-architecture\fP is specified. The
  308. architecture \fBdpkg\fP is built for (i.e. the output of
  309. \fB\-\-print\-architecture\fP) can never be removed from that list.
  310. .TP
  311. .B \-\-print\-architecture
  312. Print architecture of packages \fBdpkg\fP installs (for example, \(lqi386\(rq).
  313. .TP
  314. .B \-\-print\-foreign\-architectures
  315. Print a newline-separated list of the extra architectures \fBdpkg\fP is
  316. configured to allow packages to be installed for (since dpkg 1.16.2).
  317. .TP
  318. .BI \-\-assert\- feature
  319. Asserts that \fBdpkg\fP supports the requested feature.
  320. Returns 0 if the feature is fully supported, 1 if the feature is known but
  321. \fBdpkg\fP cannot provide support for it yet, and 2 if the feature is unknown.
  322. The current list of assertable features is:
  323. .RS
  324. .TP
  325. .B support\-predepends
  326. Supports the \fBPre\-Depends\fP field (since dpkg 1.1.0).
  327. .TP
  328. .B working\-epoch
  329. Supports epochs in version strings (since dpkg 1.4.0.7).
  330. .TP
  331. .B long\-filenames
  332. Supports long filenames in \fBdeb\fP(5) archives (since dpkg 1.4.1.17).
  333. .TP
  334. .B multi\-conrep
  335. Supports multiple \fBConflicts\fP and \fBReplaces\fP (since dpkg 1.4.1.19).
  336. .TP
  337. .B multi\-arch
  338. Supports multi-arch fields and semantics (since dpkg 1.16.2).
  339. .TP
  340. .B versioned\-provides
  341. Supports versioned \fBProvides\fP (since dpkg 1.17.11).
  342. .RE
  343. .TP
  344. .B \-\-compare\-versions \fIver1 op ver2\fP
  345. Compare version numbers, where \fIop\fP is a binary operator. \fBdpkg\fP
  346. returns success (zero result) if the specified condition is satisfied,
  347. and failure (nonzero result) otherwise. There are
  348. two groups of operators, which differ in how they treat an empty
  349. \fIver1\fP or \fIver2\fP. These treat an empty version as earlier than any
  350. version: \fBlt le eq ne ge gt\fP. These treat an empty version as later
  351. than any version: \fBlt\-nl le\-nl ge\-nl gt\-nl\fP. These are provided
  352. only for compatibility with control file syntax: \fB< << <= = >= >>
  353. >\fP. The \fB<\fP and \fB>\fP operators are obsolete and should \fBnot\fP
  354. be used, due to confusing semantics. To illustrate: \fB0.1 < 0.1\fP
  355. evaluates to true.
  356. .\" .TP
  357. .\" .B \-\-command\-fd \fIn\fP
  358. .\" Accept a series of commands on input file descriptor \fIn\fP. Note:
  359. .\" additional options set on the command line, and through this file descriptor,
  360. .\" are not reset for subsequent commands executed during the same run.
  361. .TP
  362. .BR \-? ", " \-\-help
  363. Display a brief help message.
  364. .TP
  365. .B \-\-force\-help
  366. Give help about the \fB\-\-force\-\fP\fIthing\fP options.
  367. .TP
  368. .BR \-Dh ", " \-\-debug=help
  369. Give help about debugging options.
  370. .TP
  371. \fB\-\-version\fP
  372. Display \fBdpkg\fP version information.
  373. .TP
  374. \fBdpkg\-deb actions\fP
  375. See \fBdpkg\-deb\fP(1) for more information about the following actions.
  376. .nf
  377. \fB\-b\fP, \fB\-\-build\fP \fIdirectory\fP [\fIarchive\fP|\fIdirectory\fP]
  378. Build a deb package.
  379. \fB\-c\fP, \fB\-\-contents\fP \fIarchive\fP
  380. List contents of a deb package.
  381. \fB\-e\fP, \fB\-\-control\fP \fIarchive\fP [\fIdirectory\fP]
  382. Extract control-information from a package.
  383. \fB\-x\fP, \fB\-\-extract\fP \fIarchive directory\fP
  384. Extract the files contained by package.
  385. \fB\-X\fP, \fB\-\-vextract\fP \fIarchive directory\fP
  386. Extract and display the filenames contained by a
  387. package.
  388. \fB\-f\fP, \fB\-\-field\fP \fIarchive\fP [\fIcontrol-field\fP...]
  389. Display control field(s) of a package.
  390. .BR \-\-ctrl\-tarfile " \fIarchive\fP"
  391. Output the control tar-file contained in a Debian package.
  392. \fB\-\-fsys\-tarfile\fP \fIarchive\fP
  393. Output the filesystem tar-file contained by a Debian package.
  394. \fB\-I\fP, \fB\-\-info\fP \fIarchive\fP [\fIcontrol-file\fP...]
  395. Show information about a package.
  396. .fi
  397. .TP
  398. \fBdpkg\-query actions\fP
  399. See \fBdpkg\-query\fP(1) for more information about the following actions.
  400. .nf
  401. \fB\-l\fP, \fB\-\-list\fP \fIpackage-name-pattern\fP...
  402. List packages matching given pattern.
  403. \fB\-s\fP, \fB\-\-status\fP \fIpackage-name\fP...
  404. Report status of specified package.
  405. \fB\-L\fP, \fB\-\-listfiles\fP \fIpackage-name\fP...
  406. List files installed to your system from \fIpackage-name\fP.
  407. \fB\-S\fP, \fB\-\-search\fP \fIfilename-search-pattern\fP...
  408. Search for a filename from installed packages.
  409. \fB\-p\fP, \fB\-\-print\-avail\fP \fIpackage-name\fP...
  410. Display details about \fIpackage-name\fP, as found in
  411. \fI/var/lib/dpkg/available\fP. Users of APT-based frontends
  412. should use \fBapt\-cache show\fP \fIpackage-name\fP instead.
  413. .fi
  414. .
  415. .SH OPTIONS
  416. All options can be specified both on the command line and in the \fBdpkg\fP
  417. configuration file \fI/etc/dpkg/dpkg.cfg\fP or fragment files (with names
  418. matching this shell pattern \(aq[0-9a-zA-Z_-]*\(aq) on the configuration
  419. directory \fI/etc/dpkg/dpkg.cfg.d/\fP. Each line in the configuration
  420. file is either an option (exactly the same as the command line option but
  421. without leading hyphens) or a comment (if it starts with a \fB#\fR).
  422. .br
  423. .TP
  424. \fB\-\-abort\-after=\fP\fInumber\fP
  425. Change after how many errors \fBdpkg\fP will abort. The default is 50.
  426. .TP
  427. .BR \-B ", " \-\-auto\-deconfigure
  428. When a package is removed, there is a possibility that another
  429. installed package depended on the removed package. Specifying this
  430. option will cause automatic deconfiguration of the package which
  431. depended on the removed package.
  432. .TP
  433. \fB\-D\fIoctal\fP, \fB\-\-debug=\fP\fIoctal\fP
  434. Switch debugging on. \fIoctal\fP is formed by bitwise-orring desired
  435. values together from the list below (note that these values may change
  436. in future releases). \fB\-Dh\fP or \fB\-\-debug=help\fP display these
  437. debugging values.
  438. Number Description
  439. 1 Generally helpful progress information
  440. 2 Invocation and status of maintainer scripts
  441. 10 Output for each file processed
  442. 100 Lots of output for each file processed
  443. 20 Output for each configuration file
  444. 200 Lots of output for each configuration file
  445. 40 Dependencies and conflicts
  446. 400 Lots of dependencies/conflicts output
  447. 10000 Trigger activation and processing
  448. 20000 Lots of output regarding triggers
  449. 40000 Silly amounts of output regarding triggers
  450. 1000 Lots of drivel about e.g. the dpkg/info dir
  451. 2000 Insane amounts of drivel
  452. .TP
  453. .B \-\-force\-\fIthings\fP
  454. .TQ
  455. .BR \-\-no\-force\-\fIthings\fP ", " \-\-refuse\-\fIthings\fP
  456. Force or refuse (\fBno\-force\fP and \fBrefuse\fP mean the same thing)
  457. to do some things. \fIthings\fP is a comma separated list of things
  458. specified below. \fB\-\-force\-help\fP displays a message describing them.
  459. Things marked with (*) are forced by default.
  460. \fIWarning: These options are mostly intended to be used by experts
  461. only. Using them without fully understanding their effects may break
  462. your whole system.\fP
  463. \fBall\fP:
  464. Turns on (or off) all force options.
  465. \fBdowngrade\fP(*):
  466. Install a package, even if newer version of it is already installed.
  467. \fIWarning: At present \fP\fBdpkg\fP\fI does not do any dependency
  468. checking on downgrades and therefore will not warn you
  469. if the downgrade breaks the dependency of some other
  470. package. This can have serious side effects, downgrading
  471. essential system components can even make your whole
  472. system unusable. Use with care.\fP
  473. \fBconfigure\-any\fP:
  474. Configure also any unpacked but unconfigured packages on which the current
  475. package depends.
  476. \fBhold\fP:
  477. Process packages even when marked \(lqhold\(rq.
  478. \fBremove\-reinstreq\fP:
  479. Remove a package, even if it's broken and marked to require
  480. reinstallation. This may, for example, cause parts of the package to
  481. remain on the system, which will then be forgotten by \fBdpkg\fP.
  482. \fBremove\-essential\fP:
  483. Remove, even if the package is considered essential. Essential
  484. packages contain mostly very basic Unix commands. Removing them might
  485. cause the whole system to stop working, so use with caution.
  486. \fBdepends\fP:
  487. Turn all dependency problems into warnings.
  488. \fBdepends\-version\fP:
  489. Don't care about versions when checking dependencies.
  490. \fBbreaks\fP:
  491. Install, even if this would break another package (since dpkg 1.14.6).
  492. \fBconflicts\fP:
  493. Install, even if it conflicts with another package. This is dangerous,
  494. for it will usually cause overwriting of some files.
  495. \fBconfmiss\fP:
  496. If a conffile is missing and the version in the package did change, always
  497. install the missing conffile without prompting. This is dangerous, since
  498. it means not preserving a change (removing) made to the file.
  499. \fBconfnew\fP:
  500. If a conffile has been modified and the version in the package did change,
  501. always install the new version without prompting, unless the
  502. \fB\-\-force\-confdef\fP is also specified, in which case the default
  503. action is preferred.
  504. \fBconfold\fP:
  505. If a conffile has been modified and the version in the package did change,
  506. always keep the old version without prompting, unless the
  507. \fB\-\-force\-confdef\fP is also specified, in which case the default
  508. action is preferred.
  509. \fBconfdef\fP:
  510. If a conffile has been modified and the version in the package did change,
  511. always choose the default action without prompting. If there is no default
  512. action it will stop to ask the user unless \fB\-\-force\-confnew\fP or
  513. \fB\-\-force\-confold\fP is also been given, in which case it will use
  514. that to decide the final action.
  515. \fBconfask\fP:
  516. If a conffile has been modified always offer to replace it with the
  517. version in the package, even if the version in the package did not
  518. change (since dpkg 1.15.8).
  519. If any of \fB\-\-force\-confmiss\fP, \fB\-\-force\-confnew\fP,
  520. \fB\-\-force\-confold\fP, or \fB\-\-force\-confdef\fP is also given,
  521. it will be used to decide the final action.
  522. \fBoverwrite\fP:
  523. Overwrite one package's file with another's file.
  524. \fBoverwrite\-dir\fP:
  525. Overwrite one package's directory with another's file.
  526. \fBoverwrite\-diverted\fP:
  527. Overwrite a diverted file with an undiverted version.
  528. \fBunsafe\-io\fP:
  529. Do not perform safe I/O operations when unpacking (since dpkg 1.15.8.6).
  530. Currently this
  531. implies not performing file system syncs before file renames, which is
  532. known to cause substantial performance degradation on some file systems,
  533. unfortunately the ones that require the safe I/O on the first place due
  534. to their unreliable behaviour causing zero-length files on abrupt
  535. system crashes.
  536. \fINote\fP: For ext4, the main offender, consider using instead the
  537. mount option \fBnodelalloc\fP, which will fix both the performance
  538. degradation and the data safety issues, the latter by making the file
  539. system not produce zero-length files on abrupt system crashes with
  540. any software not doing syncs before atomic renames.
  541. \fIWarning: Using this option might improve performance at the cost of
  542. losing data, use with care.\fP
  543. \fBarchitecture\fP:
  544. Process even packages with wrong or no architecture.
  545. \fBbad\-version\fP:
  546. Process even packages with wrong versions (since dpkg 1.16.1).
  547. \fBbad\-path\fP:
  548. \fBPATH\fP is missing important programs, so problems are likely.
  549. \fBnot\-root\fP:
  550. Try to (de)install things even when not root.
  551. \fBbad\-verify\fP:
  552. Install a package even if it fails authenticity check.
  553. .TP
  554. \fB\-\-ignore\-depends\fP=\fIpackage\fP,...
  555. Ignore dependency-checking for specified packages (actually, checking is
  556. performed, but only warnings about conflicts are given, nothing else).
  557. .TP
  558. \fB\-\-no\-act\fP, \fB\-\-dry\-run\fP, \fB\-\-simulate\fP
  559. Do everything which is supposed to be done, but don't write any
  560. changes. This is used to see what would happen with the specified
  561. action, without actually modifying anything.
  562. Be sure to give \fB\-\-no\-act\fP before the action-parameter, or you might
  563. end up with undesirable results. (e.g. \fBdpkg \-\-purge foo
  564. \-\-no\-act\fP will first purge package foo and then try to purge package
  565. \-\-no\-act, even though you probably expected it to actually do nothing)
  566. .TP
  567. \fB\-R\fP, \fB\-\-recursive\fP
  568. Recursively handle all regular files matching pattern \fB*.deb\fP
  569. found at specified directories and all of its subdirectories. This can
  570. be used with \fB\-i\fP, \fB\-A\fP, \fB\-\-install\fP, \fB\-\-unpack\fP and
  571. \fB\-\-avail\fP actions.
  572. .TP
  573. \fB\-G\fP
  574. Don't install a package if a newer version of the same package is already
  575. installed. This is an alias of \fB\-\-refuse\-downgrade\fP.
  576. .TP
  577. .BI \-\-admindir= dir
  578. Change default administrative directory, which contains many files that
  579. give information about status of installed or uninstalled packages, etc.
  580. (Defaults to \fI/var/lib/dpkg\fP)
  581. .TP
  582. .BI \-\-instdir= dir
  583. Change default installation directory which refers to the directory where
  584. packages are to be installed. \fBinstdir\fP is also the directory passed
  585. to \fBchroot\fP(2) before running package's installation scripts, which
  586. means that the scripts see \fBinstdir\fP as a root directory.
  587. (Defaults to \fI/\fP)
  588. .TP
  589. .BI \-\-root= dir
  590. Changing \fBroot\fP changes \fBinstdir\fP to \fIdir\fP and \fBadmindir\fP
  591. to \fIdir\fP\fB/var/lib/dpkg\fP.
  592. .TP
  593. \fB\-O\fP, \fB\-\-selected\-only\fP
  594. Only process the packages that are selected for installation. The
  595. actual marking is done with \fBdselect\fP or by \fBdpkg\fP, when it
  596. handles packages. For example, when a package is removed, it will
  597. be marked selected for deinstallation.
  598. .TP
  599. .BR \-E ", " \-\-skip\-same\-version
  600. Don't install the package if the same version of the package is already
  601. installed.
  602. .TP
  603. .BI \-\-pre\-invoke= command
  604. .TQ
  605. .BI \-\-post\-invoke= command
  606. Set an invoke hook \fIcommand\fP to be run via \*(lqsh \-c\*(rq before or
  607. after the \fBdpkg\fP run for the \fIunpack\fP, \fIconfigure\fP, \fIinstall\fP,
  608. \fItriggers\-only\fP, \fIremove\fP, \fIpurge\fP, \fIadd\-architecture\fP and
  609. \fIremove\-architecture\fP \fBdpkg\fP actions (since dpkg 1.15.4;
  610. \fIadd\-architecture\fP and \fIremove\-architecture\fP actions
  611. since dpkg 1.17.19). This
  612. option can be specified multiple times. The order the options are specified
  613. is preserved, with the ones from the configuration files taking precedence.
  614. The environment variable \fBDPKG_HOOK_ACTION\fP is set for the hooks to the
  615. current \fBdpkg\fP action. Note: front-ends might call \fBdpkg\fP several
  616. times per invocation, which might run the hooks more times than expected.
  617. .TP
  618. .BI \-\-path\-exclude= glob-pattern
  619. .TQ
  620. .BI \-\-path\-include= glob-pattern
  621. Set \fIglob-pattern\fP as a path filter, either by excluding or re-including
  622. previously excluded paths matching the specified patterns during install
  623. (since dpkg 1.15.8).
  624. \fIWarning: take into account that depending on the excluded paths you
  625. might completely break your system, use with caution.\fP
  626. The glob patterns use the same wildcards used in the shell, were
  627. \(oq*\(cq matches any sequence of characters, including the empty string
  628. and also \(oq/\(cq.
  629. For example, \(Fo\fI/usr/*/READ*\fP\(Fc matches
  630. \(Fo\fI/usr/share/doc/package/README\fP\(Fc.
  631. As usual, \(oq?\(cq matches any single character (again, including \(oq/\(cq).
  632. And \(oq[\(cq
  633. starts a character class, which can contain a list of characters, ranges
  634. and complementations. See \fBglob\fP(7) for detailed information about
  635. globbing. Note: the current implementation might re-include more directories
  636. and symlinks than needed, to be on the safe side and avoid possible unpack
  637. failures, future work might fix this.
  638. This can be used to remove all paths except some particular ones; a typical
  639. case is:
  640. .nf
  641. .B \-\-path\-exclude=/usr/share/doc/*
  642. .B \-\-path\-include=/usr/share/doc/*/copyright
  643. .fi
  644. to remove all documentation files except the copyright files.
  645. These two options can be specified multiple times, and interleaved with
  646. each other. Both are processed in the given order, with the last rule that
  647. matches a file name making the decision.
  648. .TP
  649. .BI \-\-verify\-format " format-name"
  650. Sets the output format for the \fB\-\-verify\fP command (since dpkg 1.17.2).
  651. The only currently supported output format is \fBrpm\fP, which consists
  652. of a line for every path that failed any check.
  653. The lines start with 9 characters to report each specific check result,
  654. a \(oq\fB?\fP\(cq implies the check could not be done (lack of support,
  655. file permissions, etc), \(oq\fB.\fP\(cq implies the check passed, and
  656. an alphanumeric character implies a specific check failed; the md5sum
  657. verification is denoted with a \(oq\fB5\fP\(cq on the third character.
  658. The line is followed by a space and an attribute character (currently
  659. \(oq\fBc\fP\(cq for conffiles), another space and the pathname.
  660. .TP
  661. \fB\-\-status\-fd \fR\fIn\fR
  662. Send machine-readable package status and progress information to file
  663. descriptor \fIn\fP. This option can be specified multiple times. The
  664. information is generally one record per line, in one of the following
  665. forms:
  666. .RS
  667. .TP
  668. .BI "status: " package ": " status
  669. Package status changed; \fIstatus\fR is as in the status file.
  670. .TP
  671. .BI "status: " package " : error : " extended-error-message
  672. An error occurred. Any possible newlines in \fIextended-error-message\fR
  673. will be converted to spaces before output.
  674. .TP
  675. .BI "status: " file " : conffile\-prompt : '" real-old "' '" real-new "' " useredited " " distedited
  676. User is being asked a conffile question.
  677. .TP
  678. .BI "processing: " stage ": " package
  679. Sent just before a processing stage starts. \fIstage\fR is one of
  680. .BR upgrade ", " install " (both sent before unpacking),"
  681. .BR configure ", " trigproc ", " disappear ", " remove ", " purge .
  682. .RE
  683. .TP
  684. \fB\-\-status\-logger\fR=\fIcommand\fR
  685. Send machine-readable package status and progress information to the
  686. shell \fIcommand\fR's standard input, to be run via \*(lqsh \-c\*(rq
  687. (since dpkg 1.16.0).
  688. This option can be specified multiple times.
  689. The output format used is the same as in \fB\-\-status\-fd\fP.
  690. .RE
  691. .TP
  692. \fB\-\-log=\fP\fIfilename\fP
  693. Log status change updates and actions to \fIfilename\fP, instead of
  694. the default \fI/var/log/dpkg.log\fP. If this option is given multiple
  695. times, the last filename is used. Log messages are of the form
  696. \(oqYYYY-MM-DD HH:MM:SS startup \fItype\fP \fIcommand\fP\(cq for each dpkg
  697. invocation where \fItype\fP is \fBarchives\fP (with a \fIcommand\fP of
  698. \fBunpack\fP or \fBinstall\fP) or \fBpackages\fP (with a \fIcommand\fP of
  699. \fBconfigure\fP, \fBtriggers\-only\fP, \fBremove\fP or \fBpurge\fP);
  700. \(oqYYYY-MM-DD HH:MM:SS status \fIstate\fP \fIpkg\fP \fIinstalled-version\fP\(cq
  701. for status change updates;
  702. \(oqYYYY-MM-DD HH:MM:SS \fIaction\fP \fIpkg\fP \fIinstalled-version\fP
  703. \fIavailable-version\fP\(cq for actions where \fIaction\fP is one of
  704. \fBinstall\fP, \fBupgrade\fP, \fBconfigure\fP, \fBtrigproc\fP,
  705. \fBdisappear\fP, \fBremove\fP or \fBpurge\fP; and
  706. \(oqYYYY-MM-DD HH:MM:SS conffile \fIfilename\fP \fIdecision\fP\(cq for conffile
  707. changes where \fIdecision\fP is either \fBinstall\fP or \fBkeep\fP.
  708. .TP
  709. \fB\-\-no\-debsig\fP
  710. Do not try to verify package signatures.
  711. .TP
  712. \fB\-\-no\-triggers\fP
  713. Do not run any triggers in this run (since dpkg 1.14.17), but activations
  714. will still be recorded.
  715. If used with \fB\-\-configure\fP \fIpackage\fP or
  716. \fB\-\-triggers\-only\fP \fIpackage\fP then the named package postinst
  717. will still be run even if only a triggers run is needed. Use of this option
  718. may leave packages in the improper \fBtriggers\-awaited\fP and
  719. \fBtriggers\-pending\fP states. This can be fixed later by running:
  720. \fBdpkg \-\-configure \-\-pending\fP.
  721. .TP
  722. \fB\-\-triggers\fP
  723. Cancels a previous \fB\-\-no\-triggers\fP (since dpkg 1.14.17).
  724. .
  725. .SH ENVIRONMENT
  726. .TP
  727. .B PATH
  728. This variable is expected to be defined in the environment and point to
  729. the system paths where several required programs are to be found. If it's
  730. not set or the programs are not found, \fBdpkg\fP will abort.
  731. .TP
  732. .B HOME
  733. If set, \fBdpkg\fP will use it as the directory from which to read the user
  734. specific configuration file.
  735. .TP
  736. .B TMPDIR
  737. If set, \fBdpkg\fP will use it as the directory in which to create
  738. temporary files and directories.
  739. .TP
  740. .B PAGER
  741. The program \fBdpkg\fP will execute when displaying the conffiles.
  742. .TP
  743. .B SHELL
  744. The program \fBdpkg\fP will execute when starting a new interactive shell.
  745. .TP
  746. .B COLUMNS
  747. Sets the number of columns \fBdpkg\fP should use when displaying formatted
  748. text. Currently only used by \-l.
  749. .TP
  750. .B DPKG_SHELL_REASON
  751. Defined by \fBdpkg\fP on the shell spawned on the conffile prompt to
  752. examine the situation (since dpkg 1.15.6).
  753. Current valid value: \fBconffile\-prompt\fP.
  754. .TP
  755. .B DPKG_CONFFILE_OLD
  756. Defined by \fBdpkg\fP on the shell spawned on the conffile prompt to
  757. examine the situation (since dpkg 1.15.6).
  758. Contains the path to the old conffile.
  759. .TP
  760. .B DPKG_CONFFILE_NEW
  761. Defined by \fBdpkg\fP on the shell spawned on the conffile prompt to
  762. examine the situation (since dpkg 1.15.6).
  763. Contains the path to the new conffile.
  764. .TP
  765. .B DPKG_HOOK_ACTION
  766. Defined by \fBdpkg\fP on the shell spawned when executing a hook action
  767. (since dpkg 1.15.4).
  768. Contains the current \fBdpkg\fP action.
  769. .TP
  770. .B DPKG_RUNNING_VERSION
  771. Defined by \fBdpkg\fP on the maintainer script environment to the
  772. version of the currently running \fBdpkg\fP instance (since dpkg 1.14.17).
  773. .TP
  774. .B DPKG_MAINTSCRIPT_PACKAGE
  775. Defined by \fBdpkg\fP on the maintainer script environment to the
  776. (non-arch-qualified) package name being handled (since dpkg 1.14.17).
  777. .TP
  778. .B DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT
  779. Defined by \fBdpkg\fP on the maintainer script environment to the
  780. package reference count, i.e. the number of package instances with
  781. a state greater than \fBnot\-installed\fP (since dpkg 1.17.2).
  782. .TP
  783. .B DPKG_MAINTSCRIPT_ARCH
  784. Defined by \fBdpkg\fP on the maintainer script environment to the
  785. architecture the package got built for (since dpkg 1.15.4).
  786. .TP
  787. .B DPKG_MAINTSCRIPT_NAME
  788. Defined by \fBdpkg\fP on the maintainer script environment to the
  789. name of the script running, one of \fBpreinst\fP, \fBpostinst\fP,
  790. \fBprerm\fP or \fBpostrm\fP (since dpkg 1.15.7).
  791. .
  792. .SH FILES
  793. .TP
  794. .I /etc/dpkg/dpkg.cfg.d/[0-9a-zA-Z_-]*
  795. Configuration fragment files (since dpkg 1.15.4).
  796. .TP
  797. .I /etc/dpkg/dpkg.cfg
  798. Configuration file with default options.
  799. .TP
  800. .I /var/log/dpkg.log
  801. Default log file (see \fI/etc/dpkg/dpkg.cfg\fP(5) and option
  802. \fB\-\-log\fP).
  803. .P
  804. The other files listed below are in their default directories, see option
  805. \fB\-\-admindir\fP to see how to change locations of these files.
  806. .TP
  807. .I /var/lib/dpkg/available
  808. List of available packages.
  809. .TP
  810. .I /var/lib/dpkg/status
  811. Statuses of available packages. This file contains information about
  812. whether a package is marked for removing or not, whether it is
  813. installed or not, etc. See section \fBINFORMATION ABOUT PACKAGES\fP
  814. for more info.
  815. The status file is backed up daily in \fI/var/backups\fP. It can be
  816. useful if it's lost or corrupted due to filesystems troubles.
  817. .P
  818. The following files are components of a binary package. See \fBdeb\fP(5)
  819. for more information about them:
  820. .RS
  821. .nf
  822. .I control
  823. .I conffiles
  824. .I preinst
  825. .I postinst
  826. .I prerm
  827. .I postrm
  828. .I triggers
  829. .fi
  830. .RE
  831. .
  832. .SH BUGS
  833. \fB\-\-no\-act\fP usually gives less information than might be helpful.
  834. .
  835. .SH EXAMPLES
  836. To list installed packages related to the editor \fBvi\fP(1) (note that
  837. \fBdpkg\-query\fP does not load the \fIavailable\fP file anymore by
  838. default, and the \fBdpkg\-query\fP \fB\-\-load\-avail\fP option should
  839. be used instead for that):
  840. .br
  841. \fB dpkg \-l \(aq*vi*\(aq\fP
  842. .br
  843. To see the entries in \fI/var/lib/dpkg/available\fP of two packages:
  844. .br
  845. \fB dpkg \-\-print\-avail elvis vim | less\fP
  846. .br
  847. To search the listing of packages yourself:
  848. .br
  849. \fB less /var/lib/dpkg/available\fP
  850. .br
  851. To remove an installed elvis package:
  852. .br
  853. \fB dpkg \-r elvis\fP
  854. .br
  855. To install a package, you first need to find it in an archive or
  856. CDROM. The \fIavailable\fP file shows that the vim package is in section
  857. \fBeditors\fP:
  858. .br
  859. \fB cd /media/cdrom/pool/main/v/vim\fP
  860. \fB dpkg \-i vim_4.5\-3.deb\fP
  861. .br
  862. To make a local copy of the package selection states:
  863. .br
  864. \fB dpkg \-\-get\-selections >myselections\fP
  865. .br
  866. You might transfer this file to another computer, and after having updated
  867. the \fIavailable\fP file there with your package manager frontend of choice
  868. (see https://wiki.debian.org/Teams/Dpkg/FAQ for more details), for example:
  869. .br
  870. \fB apt\-cache dumpavail | dpkg \-\-merge\-avail\fP
  871. .br
  872. or with dpkg 1.17.6 and earlier:
  873. .br
  874. \fB avail=`mktemp`\fP
  875. \fB apt\-cache dumpavail >"$avail"\fP
  876. \fB dpkg \-\-merge\-avail "$avail"\fP
  877. \fB rm "$avail"\fP
  878. .br
  879. you can install it with:
  880. .br
  881. \fB dpkg \-\-clear\-selections\fP
  882. \fB dpkg \-\-set\-selections <myselections\fP
  883. .br
  884. Note that this will not actually install or remove anything, but just
  885. set the selection state on the requested packages. You will need some
  886. other application to actually download and install the requested
  887. packages. For example, run \fBapt\-get dselect\-upgrade\fP.
  888. Ordinarily, you will find that \fBdselect\fP(1) provides a more
  889. convenient way to modify the package selection states.
  890. .br
  891. .
  892. .SH ADDITIONAL FUNCTIONALITY
  893. Additional functionality can be gained by installing any of the
  894. following packages: \fBapt\fR, \fBaptitude\fR and \fBdebsums\fR.
  895. .
  896. .SH SEE ALSO
  897. .ad l
  898. .nh
  899. \fBaptitude\fP(1),
  900. \fBapt\fP(1),
  901. \fBdselect\fP(1),
  902. \fBdpkg\-deb\fP(1),
  903. \fBdpkg\-query\fP(1),
  904. \fBdeb\fP(5),
  905. \fBdeb\-control\fP(5),
  906. \fBdpkg.cfg\fP(5),
  907. and
  908. \fBdpkg\-reconfigure\fP(8).
  909. .
  910. .SH AUTHORS
  911. See \fI/usr/share/doc/dpkg/THANKS\fP for the list of people who have
  912. contributed to \fBdpkg\fP.