dpkg.1 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840
  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-2013 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 <http://www.gnu.org/licenses/>.
  25. .
  26. .TH dpkg 1 "2013-04-05" "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 unpacked and configured OK.
  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. All pending triggers will be processed. If package
  160. names are supplied only those packages' triggers will be processed, exactly
  161. once each where necessary. Use of this option may leave packages in the
  162. improper \fBtriggers\-awaited\fP and \fBtriggers\-pending\fP states. This
  163. can be fixed later by running: \fBdpkg \-\-configure \-\-pending\fP.
  164. .TP
  165. \fB\-r\fP, \fB\-\-remove\fP, \fB\-P\fP, \fB\-\-purge \fP\fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  166. Remove an installed package. \fB\-r\fP or \fB\-\-remove\fP remove
  167. everything except conffiles. This may avoid having to
  168. reconfigure the package if it is reinstalled later. (Conffiles are configuration
  169. files that are listed in the \fIDEBIAN/conffiles\fP control
  170. file). \fB\-P\fP or \fB\-\-purge\fP removes everything, including
  171. conffiles. If \fB\-a\fP or \fB\-\-pending\fP is given instead of a package
  172. name, then all packages unpacked, but marked to be removed or purged
  173. in file \fI/var/lib/dpkg/status\fP, are removed or purged,
  174. respectively. Note: some configuration files might be unknown to
  175. \fBdpkg\fP because they are created and handled separately through the
  176. configuration scripts. In that case, \fBdpkg\fP won't remove them by
  177. itself, but the package's \fIpostrm\fP script (which is called by
  178. \fBdpkg\fP), has to take care of their removal during purge. Of course,
  179. this only applies to files in system directories, not configuration files
  180. written to individual users' home directories.
  181. Removing of a package consists of the following steps:
  182. .br
  183. \fB1.\fP Run \fIprerm\fP script
  184. .br
  185. \fB2.\fP Remove the installed files
  186. .br
  187. \fB3.\fP Run \fIpostrm\fP script
  188. .br
  189. .TP
  190. \fB\-\-update\-avail\fP, \fB\-\-merge\-avail\fP \fIPackages-file\fP
  191. Update \fBdpkg\fP's and \fBdselect\fP's idea of which packages are
  192. available. With action \fB\-\-merge\-avail\fP, old information is
  193. combined with information from \fIPackages-file\fP. With action
  194. \fB\-\-update\-avail\fP, old information is replaced with the information
  195. in the \fIPackages-file\fP. The \fIPackages-file\fP distributed with
  196. Debian is simply named \fIPackages\fP. \fBdpkg\fP keeps its
  197. record of available packages in \fI/var/lib/dpkg/available\fP.
  198. A simpler one-shot command to retrieve and update the \fIavailable\fR
  199. file is \fBdselect update\fR. Note that this file is mostly useless
  200. if you don't use \fBdselect\fR but an APT-based frontend: APT has its
  201. own system to keep track of available packages.
  202. .TP
  203. \fB\-A\fP, \fB\-\-record\-avail\fP \fIpackage-file\fP...
  204. Update \fBdpkg\fP and \fBdselect\fP's idea of which packages are
  205. available with information from the package \fIpackage-file\fP. If
  206. \fB\-\-recursive\fP or \fB\-R\fP option is specified, \fIpackage-file\fP
  207. must refer to a directory instead.
  208. .TP
  209. .B \-\-forget\-old\-unavail
  210. Now \fBobsolete\fP and a no-op as \fBdpkg\fP will automatically forget
  211. uninstalled unavailable packages.
  212. .TP
  213. .B \-\-clear\-avail
  214. Erase the existing information about what packages are available.
  215. .TP
  216. \fB \-C\fP, \fB\-\-audit\fP
  217. Searches for packages that have been installed only partially on your
  218. system. \fBdpkg\fP will suggest what to do with them to get them
  219. working.
  220. .TP
  221. \fB\-\-get\-selections\fP [\fIpackage-name-pattern\fP...]
  222. Get list of package selections, and write it to stdout. Without a pattern,
  223. non-installed packages (i.e. those which have been previously purged)
  224. will not be shown.
  225. .TP
  226. .B \-\-set\-selections
  227. Set package selections using file read from stdin. This file should be
  228. in the format '\fIpackage\fP \fIstate\fP', where state is one of
  229. \fBinstall\fP, \fBhold\fP, \fBdeinstall\fP or \fBpurge\fP. Blank lines
  230. and comment lines beginning with '#' are also permitted.
  231. The available database needs to be up-to-date for this command to be
  232. useful, otherwise unknown packages will be ignored with a warning. See
  233. the \fB\-\-update\-avail\fP and \fB\-\-merge\-avail\fP commands for more
  234. information.
  235. .TP
  236. .B \-\-clear\-selections
  237. Set the requested state of every non-essential package to deinstall.
  238. This is intended to be used immediately before \fB\-\-set\-selections\fP,
  239. to deinstall any packages not in list given to \fB\-\-set\-selections\fP.
  240. .TP
  241. .B \-\-yet\-to\-unpack
  242. Searches for packages selected for installation, but which for some
  243. reason still haven't been installed.
  244. .TP
  245. .B \-\-add\-architecture \fIarchitecture\fP
  246. Add \fIarchitecture\fP to the list of architectures for which packages can
  247. be installed without using \fB\-\-force\-architecture\fP. The architecture
  248. \fBdpkg\fP is built for (i.e. the output of \fB\-\-print\-architecture\fP)
  249. is always part of that list.
  250. .TP
  251. .B \-\-remove\-architecture \fIarchitecture\fP
  252. Remove \fIarchitecture\fP from the list of architectures for which packages
  253. can be installed without using \fB\-\-force\-architecture\fP. If the
  254. architecture is currently in use in the database then the operation will
  255. be refused, except if \fB\-\-force\-architecture\fP is specified. The
  256. architecture \fBdpkg\fP is built for (i.e. the output of
  257. \fB\-\-print\-architecture\fP) can never be removed from that list.
  258. .TP
  259. .B \-\-print\-architecture
  260. Print architecture of packages \fBdpkg\fP installs (for example, "i386").
  261. .TP
  262. .B \-\-print\-foreign\-architectures
  263. Print a newline-separated list of the extra architectures \fBdpkg\fP is
  264. configured to allow packages to be installed for.
  265. .TP
  266. .B \-\-compare\-versions \fIver1 op ver2\fP
  267. Compare version numbers, where \fIop\fP is a binary operator. \fBdpkg\fP
  268. returns success (zero result) if the specified condition is satisfied,
  269. and failure (nonzero result) otherwise. There are
  270. two groups of operators, which differ in how they treat an empty
  271. \fIver1\fP or \fIver2\fP. These treat an empty version as earlier than any
  272. version: \fBlt le eq ne ge gt\fP. These treat an empty version as later
  273. than any version: \fBlt\-nl le\-nl ge\-nl gt\-nl\fP. These are provided
  274. only for compatibility with control file syntax: \fB< << <= = >= >>
  275. >\fP.
  276. .\" .TP
  277. .\" .B \-\-command\-fd \fIn\fP
  278. .\" Accept a series of commands on input file descriptor \fIn\fP. Note:
  279. .\" additional options set on the command line, and through this file descriptor,
  280. .\" are not reset for subsequent commands executed during the same run.
  281. .TP
  282. .BR \-? ", " \-\-help
  283. Display a brief help message.
  284. .TP
  285. .B \-\-force\-help
  286. Give help about the \fB\-\-force\-\fP\fIthing\fP options.
  287. .TP
  288. .BR \-Dh ", " \-\-debug=help
  289. Give help about debugging options.
  290. .TP
  291. \fB\-\-version\fP
  292. Display \fBdpkg\fP version information.
  293. .TP
  294. \fBdpkg\-deb actions\fP
  295. See \fBdpkg\-deb\fP(1) for more information about the following actions.
  296. .nf
  297. \fB\-b\fP, \fB\-\-build\fP \fIdirectory\fP [\fIarchive\fP|\fIdirectory\fP]
  298. Build a deb package.
  299. \fB\-c\fP, \fB\-\-contents\fP \fIarchive\fP
  300. List contents of a deb package.
  301. \fB\-e\fP, \fB\-\-control\fP \fIfilename\fP [\fIdirectory\fP]
  302. Extract control-information from a package.
  303. \fB\-x\fP, \fB\-\-extract\fP \fIarchive directory\fP
  304. Extract the files contained by package.
  305. \fB\-X\fP, \fB\-\-vextract\fP \fIarchive directory\fP
  306. Extract and display the filenames contained by a
  307. package.
  308. \fB\-f\fP, \fB\-\-field\fP \fIarchive\fP [\fIcontrol-field\fP...]
  309. Display control field(s) of a package.
  310. \fB\-\-fsys\-tarfile\fP \fIarchive\fP
  311. Display the filesystem tar-file contained by a
  312. Debian package.
  313. \fB\-I\fP, \fB\-\-info\fP \fIarchive\fP [\fIcontrol-file\fP...]
  314. Show information about a package.
  315. .fi
  316. .TP
  317. \fBdpkg\-query actions\fP
  318. See \fBdpkg\-query\fP(1) for more information about the following actions.
  319. .nf
  320. \fB\-l\fP, \fB\-\-list\fP \fIpackage-name-pattern\fP...
  321. List packages matching given pattern.
  322. \fB\-s\fP, \fB\-\-status\fP \fIpackage-name\fP...
  323. Report status of specified package.
  324. \fB\-L\fP, \fB\-\-listfiles\fP \fIpackage-name\fP...
  325. List files installed to your system from \fIpackage-name\fP.
  326. \fB\-S\fP, \fB\-\-search\fP \fIfilename-search-pattern\fP...
  327. Search for a filename from installed packages.
  328. \fB\-p\fP, \fB\-\-print\-avail\fP \fIpackage-name\fP...
  329. Display details about \fIpackage-name\fP, as found in
  330. \fI/var/lib/dpkg/available\fP. Users of APT-based frontends
  331. should use \fBapt\-cache show\fP \fIpackage-name\fP instead.
  332. .fi
  333. .
  334. .SH OPTIONS
  335. All options can be specified both on the command line and in the \fBdpkg\fP
  336. configuration file \fI/etc/dpkg/dpkg.cfg\fP or fragment files (with names
  337. matching this shell pattern \(aq[0-9a-zA-Z_-]*\(aq) on the configuration
  338. directory \fI/etc/dpkg/dpkg.cfg.d/\fP. Each line in the configuration
  339. file is either an option (exactly the same as the command line option but
  340. without leading dashes) or a comment (if it starts with a \fB#\fR).
  341. .br
  342. .TP
  343. \fB\-\-abort\-after=\fP\fInumber\fP
  344. Change after how many errors \fBdpkg\fP will abort. The default is 50.
  345. .TP
  346. .BR \-B ", " \-\-auto\-deconfigure
  347. When a package is removed, there is a possibility that another
  348. installed package depended on the removed package. Specifying this
  349. option will cause automatic deconfiguration of the package which
  350. depended on the removed package.
  351. .TP
  352. \fB\-D\fIoctal\fP, \fB\-\-debug=\fP\fIoctal\fP
  353. Switch debugging on. \fIoctal\fP is formed by bitwise-orring desired
  354. values together from the list below (note that these values may change
  355. in future releases). \fB\-Dh\fP or \fB\-\-debug=help\fP display these
  356. debugging values.
  357. Number Description
  358. 1 Generally helpful progress information
  359. 2 Invocation and status of maintainer scripts
  360. 10 Output for each file processed
  361. 100 Lots of output for each file processed
  362. 20 Output for each configuration file
  363. 200 Lots of output for each configuration file
  364. 40 Dependencies and conflicts
  365. 400 Lots of dependencies/conflicts output
  366. 10000 Trigger activation and processing
  367. 20000 Lots of output regarding triggers
  368. 40000 Silly amounts of output regarding triggers
  369. 1000 Lots of drivel about e.g. the dpkg/info dir
  370. 2000 Insane amounts of drivel
  371. .TP
  372. \fB\-\-force\-\fP\fIthings\fP, \fB\-\-no\-force\-\fP\fIthings\fP, \fB\-\-refuse\-\fP\fIthings\fP
  373. Force or refuse (\fBno\-force\fP and \fBrefuse\fP mean the same thing)
  374. to do some things. \fIthings\fP is a comma separated list of things
  375. specified below. \fB\-\-force\-help\fP displays a message describing them.
  376. Things marked with (*) are forced by default.
  377. \fIWarning: These options are mostly intended to be used by experts
  378. only. Using them without fully understanding their effects may break
  379. your whole system.\fP
  380. \fBall\fP:
  381. Turns on (or off) all force options.
  382. \fBdowngrade\fP(*):
  383. Install a package, even if newer version of it is already installed.
  384. \fIWarning: At present \fP\fBdpkg\fP\fI does not do any dependency
  385. checking on downgrades and therefore will not warn you
  386. if the downgrade breaks the dependency of some other
  387. package. This can have serious side effects, downgrading
  388. essential system components can even make your whole
  389. system unusable. Use with care.\fP
  390. \fBconfigure\-any\fP:
  391. Configure also any unpacked but unconfigured packages on which the current
  392. package depends.
  393. \fBhold\fP:
  394. Process packages even when marked "hold".
  395. \fBremove\-reinstreq\fP:
  396. Remove a package, even if it's broken and marked to require
  397. reinstallation. This may, for example, cause parts of the package to
  398. remain on the system, which will then be forgotten by \fBdpkg\fP.
  399. \fBremove\-essential\fP:
  400. Remove, even if the package is considered essential. Essential
  401. packages contain mostly very basic Unix commands. Removing them might
  402. cause the whole system to stop working, so use with caution.
  403. \fBdepends\fP:
  404. Turn all dependency problems into warnings.
  405. \fBdepends\-version\fP:
  406. Don't care about versions when checking dependencies.
  407. \fBbreaks\fP:
  408. Install, even if this would break another package.
  409. \fBconflicts\fP:
  410. Install, even if it conflicts with another package. This is dangerous,
  411. for it will usually cause overwriting of some files.
  412. \fBconfmiss\fP:
  413. If a conffile is missing and the version in the package did change, always
  414. install the missing conffile without prompting. This is dangerous, since
  415. it means not preserving a change (removing) made to the file.
  416. \fBconfnew\fP:
  417. If a conffile has been modified and the version in the package did change,
  418. always install the new version without prompting, unless the
  419. \fB\-\-force\-confdef\fP is also specified, in which case the default
  420. action is preferred.
  421. \fBconfold\fP:
  422. If a conffile has been modified and the version in the package did change,
  423. always keep the old version without prompting, unless the
  424. \fB\-\-force\-confdef\fP is also specified, in which case the default
  425. action is preferred.
  426. \fBconfdef\fP:
  427. If a conffile has been modified and the version in the package did change,
  428. always choose the default action without prompting. If there is no default
  429. action it will stop to ask the user unless \fB\-\-force\-confnew\fP or
  430. \fB\-\-force\-confold\fP is also been given, in which case it will use
  431. that to decide the final action.
  432. \fBconfask\fP:
  433. If a conffile has been modified always offer to replace it with the
  434. version in the package, even if the version in the package did not
  435. change. If any of \fB\-\-force\-confmiss\fP, \fB\-\-force\-confnew\fP,
  436. \fB\-\-force\-confold\fP, or \fB\-\-force\-confdef\fP is also given,
  437. it will be used to decide the final action.
  438. \fBoverwrite\fP:
  439. Overwrite one package's file with another's file.
  440. \fBoverwrite\-dir\fP
  441. Overwrite one package's directory with another's file.
  442. \fBoverwrite\-diverted\fP:
  443. Overwrite a diverted file with an undiverted version.
  444. \fBunsafe\-io\fP:
  445. Do not perform safe I/O operations when unpacking. Currently this
  446. implies not performing file system syncs before file renames, which is
  447. known to cause substantial performance degradation on some file systems,
  448. unfortunately the ones that require the safe I/O on the first place due
  449. to their unreliable behaviour causing zero-length files on abrupt
  450. system crashes.
  451. \fINote\fP: For ext4, the main offender, consider using instead the
  452. mount option \fBnodelalloc\fP, which will fix both the performance
  453. degradation and the data safety issues, the latter by making the file
  454. system not produce zero-length files on abrupt system crashes with
  455. any software not doing syncs before atomic renames.
  456. \fIWarning: Using this option might improve performance at the cost of
  457. losing data, use with care.\fP
  458. \fBarchitecture\fP:
  459. Process even packages with wrong or no architecture.
  460. \fBbad\-version\fP:
  461. Process even packages with wrong versions.
  462. \fBbad\-path\fP:
  463. \fBPATH\fP is missing important programs, so problems are likely.
  464. \fBnot\-root\fP:
  465. Try to (de)install things even when not root.
  466. \fBbad\-verify\fP:
  467. Install a package even if it fails authenticity check.
  468. .TP
  469. \fB\-\-ignore\-depends\fP=\fIpackage\fP,...
  470. Ignore dependency-checking for specified packages (actually, checking is
  471. performed, but only warnings about conflicts are given, nothing else).
  472. .TP
  473. \fB\-\-no\-act\fP, \fB\-\-dry\-run\fP, \fB\-\-simulate\fP
  474. Do everything which is supposed to be done, but don't write any
  475. changes. This is used to see what would happen with the specified
  476. action, without actually modifying anything.
  477. Be sure to give \fB\-\-no\-act\fP before the action-parameter, or you might
  478. end up with undesirable results. (e.g. \fBdpkg \-\-purge foo
  479. \-\-no\-act\fP will first purge package foo and then try to purge package
  480. \-\-no\-act, even though you probably expected it to actually do nothing)
  481. .TP
  482. \fB\-R\fP, \fB\-\-recursive\fP
  483. Recursively handle all regular files matching pattern \fB*.deb\fP
  484. found at specified directories and all of its subdirectories. This can
  485. be used with \fB\-i\fP, \fB\-A\fP, \fB\-\-install\fP, \fB\-\-unpack\fP and
  486. \fB\-\-avail\fP actions.
  487. .TP
  488. \fB\-G\fP
  489. Don't install a package if a newer version of the same package is already
  490. installed. This is an alias of \fB\-\-refuse\-downgrade\fP.
  491. .TP
  492. .BI \-\-admindir= dir
  493. Change default administrative directory, which contains many files that
  494. give information about status of installed or uninstalled packages, etc.
  495. (Defaults to \fI/var/lib/dpkg\fP)
  496. .TP
  497. .BI \-\-instdir= dir
  498. Change default installation directory which refers to the directory where
  499. packages are to be installed. \fBinstdir\fP is also the directory passed
  500. to \fBchroot\fP(2) before running package's installation scripts, which
  501. means that the scripts see \fBinstdir\fP as a root directory.
  502. (Defaults to \fI/\fP)
  503. .TP
  504. .BI \-\-root= dir
  505. Changing \fBroot\fP changes \fBinstdir\fP to \fIdir\fP and \fBadmindir\fP
  506. to \fIdir\fP\fB/var/lib/dpkg\fP.
  507. .TP
  508. \fB\-O\fP, \fB\-\-selected\-only\fP
  509. Only process the packages that are selected for installation. The
  510. actual marking is done with \fBdselect\fP or by \fBdpkg\fP, when it
  511. handles packages. For example, when a package is removed, it will
  512. be marked selected for deinstallation.
  513. .TP
  514. .BR \-E ", " \-\-skip\-same\-version
  515. Don't install the package if the same version of the package is already
  516. installed.
  517. .TP
  518. .BI \-\-pre\-invoke= command
  519. .TQ
  520. .BI \-\-post\-invoke= command
  521. Set an invoke hook \fIcommand\fP to be run via \*(lqsh \-c\*(rq before or
  522. after the \fBdpkg\fP run for the \fIunpack\fP, \fIconfigure\fP, \fIinstall\fP,
  523. \fItriggers\-only\fP, \fIremove\fP and \fIpurge\fP \fBdpkg\fP actions. This
  524. option can be specified multiple times. The order the options are specified
  525. is preserved, with the ones from the configuration files taking precedence.
  526. The environment variable \fBDPKG_HOOK_ACTION\fP is set for the hooks to the
  527. current \fBdpkg\fP action. Note: front-ends might call \fBdpkg\fP several
  528. times per invocation, which might run the hooks more times than expected.
  529. .TP
  530. .BI \-\-path\-exclude= glob-pattern
  531. .TQ
  532. .BI \-\-path\-include= glob-pattern
  533. Set \fIglob-pattern\fP as a path filter, either by excluding or re-including
  534. previously excluded paths matching the specified patterns during install.
  535. \fIWarning: take into account that depending on the excluded paths you
  536. might completely break your system, use with caution.\fP
  537. The glob patterns use the same wildcards used in the shell, were '*' matches
  538. any sequence of characters, including the empty string and also '/'. For
  539. example, \fI'/usr/*/READ*'\fP matches \fI'/usr/share/doc/package/README'\fP.
  540. As usual, '?' matches any single character (again, including '/'). And '['
  541. starts a character class, which can contain a list of characters, ranges
  542. and complementations. See \fBglob\fP(7) for detailed information about
  543. globbing. Note: the current implementation might re-include more directories
  544. and symlinks than needed, to be on the safe side and avoid possible unpack
  545. failures, future work might fix this.
  546. This can be used to remove all paths except some particular ones; a typical
  547. case is:
  548. .nf
  549. .B \-\-path\-exclude=/usr/share/doc/*
  550. .B \-\-path\-include=/usr/share/doc/*/copyright
  551. .fi
  552. to remove all documentation files except the copyright files.
  553. These two options can be specified multiple times, and interleaved with
  554. each other. Both are processed in the given order, with the last rule that
  555. matches a file name making the decision.
  556. .TP
  557. \fB\-\-status\-fd \fR\fIn\fR
  558. Send machine-readable package status and progress information to file
  559. descriptor \fIn\fP. This option can be specified multiple times. The
  560. information is generally one record per line, in one of the following
  561. forms:
  562. .RS
  563. .TP
  564. .BI "status: " package ": " status
  565. Package status changed; \fIstatus\fR is as in the status file.
  566. .TP
  567. .BI "status: " package " : error : " extended-error-message
  568. An error occurred. Any possible newlines in \fIextended-error-message\fR
  569. will be converted to spaces before output.
  570. .TP
  571. .BI "status: " file " : conffile\-prompt : '" real-old "' '" real-new "' " useredited " " distedited
  572. User is being asked a conffile question.
  573. .TP
  574. .BI "processing: " stage ": " package
  575. Sent just before a processing stage starts. \fIstage\fR is one of
  576. .BR upgrade ", " install " (both sent before unpacking),"
  577. .BR configure ", " trigproc ", " disappear ", " remove ", " purge .
  578. .RE
  579. .TP
  580. \fB\-\-status\-logger\fR=\fIcommand\fR
  581. Send machine-readable package status and progress information to the
  582. shell \fIcommand\fR's standard input. This option can be specified
  583. multiple times. The output format used is the same as in \fB\-\-status\-fd.
  584. .RE
  585. .TP
  586. \fB\-\-log=\fP\fIfilename\fP
  587. Log status change updates and actions to \fIfilename\fP, instead of
  588. the default \fI/var/log/dpkg.log\fP. If this option is given multiple
  589. times, the last filename is used. Log messages are of the form
  590. `YYYY-MM-DD HH:MM:SS status \fIstate\fP \fIpkg\fP \fIinstalled-version\fP'
  591. for status change updates;
  592. `YYYY-MM-DD HH:MM:SS \fIaction\fP \fIpkg\fP \fIinstalled-version\fP
  593. \fIavailable-version\fP' for actions where \fIaction\fP is one of
  594. \fBinstall\fP, \fBupgrade\fP, \fBremove\fP, \fBpurge\fP; and
  595. `YYYY-MM-DD HH:MM:SS conffile \fIfilename\fP \fIdecision\fP' for conffile
  596. changes where \fIdecision\fP is either \fBinstall\fP or \fBkeep\fP.
  597. .TP
  598. \fB\-\-no\-debsig\fP
  599. Do not try to verify package signatures.
  600. .TP
  601. \fB\-\-no\-triggers\fP
  602. Do not run any triggers in this run (activations will still be recorded).
  603. If used with \fB\-\-configure\fP \fIpackage\fP or
  604. \fB\-\-triggers\-only\fP \fIpackage\fP then the named package postinst
  605. will still be run even if only a triggers run is needed. Use of this option
  606. may leave packages in the improper \fBtriggers\-awaited\fP and
  607. \fBtriggers\-pending\fP states. This can be fixed later by running:
  608. \fBdpkg \-\-configure \-\-pending\fP.
  609. .TP
  610. \fB\-\-triggers\fP
  611. Cancels a previous \fB\-\-no\-triggers\fP.
  612. .
  613. .SH ENVIRONMENT
  614. .TP
  615. .B HOME
  616. If set, \fBdpkg\fP will use it as the directory from which to read the user
  617. specific configuration file.
  618. .TP
  619. .B TMPDIR
  620. If set, \fBdpkg\fP will use it as the directory in which to create
  621. temporary files and directories.
  622. .TP
  623. .B PAGER
  624. The program \fBdpkg\fP will execute when displaying the conffiles.
  625. .TP
  626. .B SHELL
  627. The program \fBdpkg\fP will execute when starting a new shell.
  628. .TP
  629. .B COLUMNS
  630. Sets the number of columns \fBdpkg\fP should use when displaying formatted
  631. text. Currently only used by \-l.
  632. .TP
  633. .B DPKG_SHELL_REASON
  634. Defined by \fBdpkg\fP on the shell spawned on the conffile prompt to
  635. examine the situation. Current valid value: \fBconffile\-prompt\fP.
  636. .TP
  637. .B DPKG_CONFFILE_OLD
  638. Defined by \fBdpkg\fP on the shell spawned on the conffile prompt to
  639. examine the situation. Contains the path to the old conffile.
  640. .TP
  641. .B DPKG_CONFFILE_NEW
  642. Defined by \fBdpkg\fP on the shell spawned on the conffile prompt to
  643. examine the situation. Contains the path to the new conffile.
  644. .TP
  645. .B DPKG_RUNNING_VERSION
  646. Defined by \fBdpkg\fP on the maintainer script environment to the
  647. version of the currently running \fBdpkg\fP instance.
  648. .TP
  649. .B DPKG_MAINTSCRIPT_PACKAGE
  650. Defined by \fBdpkg\fP on the maintainer script environment to the
  651. (non-arch-qualified) package name being handled.
  652. .TP
  653. .B DPKG_MAINTSCRIPT_ARCH
  654. Defined by \fBdpkg\fP on the maintainer script environment to the
  655. architecture the package got built for.
  656. .TP
  657. .B DPKG_MAINTSCRIPT_NAME
  658. Defined by \fBdpkg\fP on the maintainer script environment to the
  659. name of the script running (preinst, postinst, prerm, postrm).
  660. .
  661. .SH FILES
  662. .TP
  663. .I /etc/dpkg/dpkg.cfg.d/[0-9a-zA-Z_-]*
  664. Configuration fragment files.
  665. .TP
  666. .I /etc/dpkg/dpkg.cfg
  667. Configuration file with default options.
  668. .TP
  669. .I /var/log/dpkg.log
  670. Default log file (see \fI/etc/dpkg/dpkg.cfg\fP(5) and option
  671. \fB\-\-log\fP).
  672. .P
  673. The other files listed below are in their default directories, see option
  674. \fB\-\-admindir\fP to see how to change locations of these files.
  675. .TP
  676. .I /var/lib/dpkg/available
  677. List of available packages.
  678. .TP
  679. .I /var/lib/dpkg/status
  680. Statuses of available packages. This file contains information about
  681. whether a package is marked for removing or not, whether it is
  682. installed or not, etc. See section \fBINFORMATION ABOUT PACKAGES\fP
  683. for more info.
  684. The status file is backed up daily in \fI/var/backups\fP. It can be
  685. useful if it's lost or corrupted due to filesystems troubles.
  686. .P
  687. The following files are components of a binary package. See \fBdeb\fP(5)
  688. for more information about them:
  689. .RS
  690. .nf
  691. .I control
  692. .I conffiles
  693. .I preinst
  694. .I postinst
  695. .I prerm
  696. .I postrm
  697. .I triggers
  698. .fi
  699. .RE
  700. .
  701. .SH BUGS
  702. \fB\-\-no\-act\fP usually gives less information than might be helpful.
  703. .
  704. .SH EXAMPLES
  705. To list installed packages related to the editor \fBvi\fP(1) (note that
  706. \fBdpkg\-query\fP does not load the available file anymore by default, and
  707. the \fBdpkg\-query\fP \fB\-\-load\-avail\fP option should be used instead
  708. for that):
  709. .br
  710. \fB dpkg \-l \(aq*vi*\(aq\fP
  711. .br
  712. To see the entries in \fI/var/lib/dpkg/available\fP of two packages:
  713. .br
  714. \fB dpkg \-\-print\-avail elvis vim | less\fP
  715. .br
  716. To search the listing of packages yourself:
  717. .br
  718. \fB less /var/lib/dpkg/available\fP
  719. .br
  720. To remove an installed elvis package:
  721. .br
  722. \fB dpkg \-r elvis\fP
  723. .br
  724. To install a package, you first need to find it in an archive or
  725. CDROM. The "available" file shows that the vim package is in section
  726. "editors":
  727. .br
  728. \fB cd /media/cdrom/pool/main/v/vim\fP
  729. \fB dpkg \-i vim_4.5\-3.deb\fP
  730. .br
  731. To make a local copy of the package selection states:
  732. .br
  733. \fB dpkg \-\-get\-selections >myselections\fP
  734. .br
  735. You might transfer this file to another computer, and install it there
  736. with:
  737. .br
  738. \fB dpkg \-\-clear\-selections\fP
  739. \fB dpkg \-\-set\-selections <myselections\fP
  740. .br
  741. Note that this will not actually install or remove anything, but just
  742. set the selection state on the requested packages. You will need some
  743. other application to actually download and install the requested
  744. packages. For example, run \fBapt\-get dselect\-upgrade\fP.
  745. Ordinarily, you will find that \fBdselect\fP(1) provides a more
  746. convenient way to modify the package selection states.
  747. .br
  748. .
  749. .SH ADDITIONAL FUNCTIONALITY
  750. Additional functionality can be gained by installing any of the
  751. following packages: \fBapt\fR, \fBaptitude\fR and \fBdebsums\fR.
  752. .
  753. .SH SEE ALSO
  754. .ad l
  755. .nh
  756. \fBaptitude\fP(1),
  757. \fBapt\fP(1),
  758. \fBdselect\fP(1),
  759. \fBdpkg\-deb\fP(1),
  760. \fBdpkg\-query\fP(1),
  761. \fBdeb\fP(5),
  762. \fBdeb\-control\fP(5),
  763. \fBdpkg.cfg\fP(5),
  764. and
  765. \fBdpkg\-reconfigure\fP(8).
  766. .
  767. .SH AUTHORS
  768. See \fI/usr/share/doc/dpkg/THANKS\fP for the list of people who have
  769. contributed to \fBdpkg\fP.