dpkg.1 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  1. .TH dpkg 1 "2010-03-07" "Debian Project" "dpkg suite"
  2. .SH NAME
  3. dpkg \- package manager for Debian
  4. .
  5. .SH SYNOPSIS
  6. .B dpkg
  7. [\fIoptions\fP] \fIaction\fP
  8. .
  9. .SH WARNING
  10. This manual is intended for users wishing to understand \fBdpkg\fP's
  11. command line options and package states in more detail than that
  12. provided by \fBdpkg \-\-help\fP.
  13. It should \fInot\fP be used by package maintainers wishing to
  14. understand how \fBdpkg\fP will install their packages. The
  15. descriptions of what \fBdpkg\fP does when installing and removing
  16. packages are particularly inadequate.
  17. .
  18. .SH DESCRIPTION
  19. \fBdpkg\fP is a tool to install, build, remove and manage
  20. Debian packages. The primary and more user-friendly
  21. front-end for \fBdpkg\fP is \fBaptitude\fP(1). \fBdpkg\fP itself is
  22. controlled entirely via command line parameters, which consist of exactly
  23. one action and zero or more options. The action-parameter tells \fBdpkg\fP
  24. what to do and options control the behavior of the action in some way.
  25. \fBdpkg\fP can also be used as a front-end to \fBdpkg\-deb\fP(1).
  26. The following
  27. are \fBdpkg\-deb\fP actions, and if they are encountered, \fBdpkg\fP
  28. just runs \fBdpkg\-deb\fP with the parameters given to it:
  29. .nf
  30. \fB\-b\fP, \fB\-\-build\fP,
  31. \fB\-c\fP, \fB\-\-contents\fP,
  32. \fB\-I\fP, \fB\-\-info\fP,
  33. \fB\-f\fP, \fB\-\-field\fP,
  34. \fB\-e\fP, \fB\-\-control\fP,
  35. \fB\-x\fP, \fB\-\-extract\fP,
  36. \fB\-X\fP, \fB\-\-vextract\fP, and
  37. \fB\-\-fsys\-tarfile\fP.
  38. .fi
  39. Please refer to \fBdpkg\-deb\fP(1) for information about these actions.
  40. .
  41. .SH INFORMATION ABOUT PACKAGES
  42. \fBdpkg\fP maintains some usable information about available
  43. packages. The information is divided in three classes: \fBstates\fP,
  44. \fBselection states\fP and \fBflags\fP. These values are intended to
  45. be changed mainly with \fBdselect\fP.
  46. .SS PACKAGE STATES
  47. .TP
  48. .B not\-installed
  49. The package is not installed on your system.
  50. .TP
  51. .B config\-files
  52. Only the configuration files of the package exist on the system.
  53. .TP
  54. .B half\-installed
  55. The installation of the package has been started, but not completed for
  56. some reason.
  57. .TP
  58. .B unpacked
  59. The package is unpacked, but not configured.
  60. .TP
  61. .B half\-configured
  62. The package is unpacked and configuration has been started, but not yet
  63. completed for some reason.
  64. .TP
  65. .B triggers\-awaited
  66. The package awaits trigger processing by another package.
  67. .TP
  68. .B triggers\-pending
  69. The package has been triggered.
  70. .TP
  71. .B installed
  72. The package is unpacked and configured OK.
  73. .SS PACKAGE SELECTION STATES
  74. .TP
  75. .B install
  76. The package is selected for installation.
  77. .TP
  78. .B hold
  79. A package marked to be on \fBhold\fP is not handled by \fBdpkg\fP,
  80. unless forced to do that with option \fB\-\-force\-hold\fP.
  81. .TP
  82. .B deinstall
  83. The package is selected for deinstallation (i.e. we want to remove all
  84. files, except configuration files).
  85. .TP
  86. .B purge
  87. The package is selected to be purged (i.e. we want to remove everything,
  88. even configuration files).
  89. .SS PACKAGE FLAGS
  90. .TP
  91. .B reinst\-required
  92. A package marked \fBreinst\-required\fP is broken and requires
  93. reinstallation. These packages cannot be removed, unless forced with
  94. option \fB\-\-force\-remove\-reinstreq\fP.
  95. .
  96. .SH ACTIONS
  97. .TP
  98. \fB\-i\fP, \fB\-\-install\fP \fIpackage_file\fP...
  99. Install the package. If \fB\-\-recursive\fP or \fB\-R\fP option is
  100. specified, \fIpackage_file\fP must refer to a directory instead.
  101. Installation consists of the following steps:
  102. .br
  103. \fB1.\fP Extract the control files of the new package.
  104. .br
  105. \fB2.\fP If another version of the same package was installed before
  106. the new installation, execute \fIprerm\fP script of the old package.
  107. .br
  108. \fB3.\fP Run \fIpreinst\fP script, if provided by the package.
  109. .br
  110. \fB4.\fP Unpack the new files, and at the same time back up the old
  111. files, so that if something goes wrong, they can be restored.
  112. .br
  113. \fB5.\fP If another version of the same package was installed before
  114. the new installation, execute the \fIpostrm\fP script of the old
  115. package. Note that this script is executed after the \fIpreinst\fP
  116. script of the new package, because new files are written at the same
  117. time old files are removed.
  118. .br
  119. \fB6.\fP Configure the package. See \fB\-\-configure\fP for detailed
  120. information about how this is done.
  121. .TP
  122. \fB\-\-unpack \fP\fIpackage_file\fP...
  123. Unpack the package, but don't configure it. If \fB\-\-recursive\fP or
  124. \fB\-R\fP option is specified, \fIpackage_file\fP must refer to a
  125. directory instead.
  126. .TP
  127. \fB\-\-configure \fP\fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  128. Reconfigure an unpacked package. If \fB\-a\fP or \fB\-\-pending\fP is
  129. given instead of \fIpackage\fP, all unpacked but unconfigured
  130. packages are configured.
  131. Configuring consists of the following steps:
  132. .br
  133. \fB1.\fP Unpack the conffiles, and at the same time back up
  134. the old conffiles, so that they can be restored if
  135. something goes wrong.
  136. .br
  137. \fB2.\fP Run \fIpostinst\fP script, if provided by the package.
  138. .TP
  139. \fB\-\-triggers\-only\fP \fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  140. Processes only triggers. All pending triggers will be processed. If package
  141. names are supplied only those packages' triggers will be processed, exactly
  142. once each where necessary. Use of this option may leave packages in the
  143. improper \fBtriggers\-awaited\fP and \fBtriggers\-pending\fP states. This
  144. can be fixed later by running: \fBdpkg \-\-configure \-\-pending\fP.
  145. .TP
  146. \fB\-r\fP, \fB\-\-remove\fP, \fB\-P\fP, \fB\-\-purge \fP\fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  147. Remove an installed package. \fB\-r\fP or \fB\-\-remove\fP remove
  148. everything except conffiles. This may avoid having to
  149. reconfigure the package if it is reinstalled later. (Conffiles are configuration
  150. files that are listed in the \fIDEBIAN/conffiles\fP control
  151. file). \fB\-P\fP or \fB\-\-purge\fP removes everything, including
  152. conffiles. If \fB\-a\fP or \fB\-\-pending\fP is given instead of a package
  153. name, then all packages unpacked, but marked to be removed or purged
  154. in file \fI/var/lib/dpkg/status\fP, are removed or purged,
  155. respectively. Note: some configuration files might be unknown to
  156. \fBdpkg\fP because they are created and handled separately through the
  157. configuration scripts. In that case, \fBdpkg\fP won't remove them by
  158. itself, but the package's \fIpostrm\fP script (which is called by
  159. \fBdpkg\fP), has to take care of their removal during purge.
  160. Removing of a package consists of the following steps:
  161. .br
  162. \fB1.\fP Run \fIprerm\fP script
  163. .br
  164. \fB2.\fP Remove the installed files
  165. .br
  166. \fB3.\fP Run \fIpostrm\fP script
  167. .br
  168. .TP
  169. \fB\-\-update\-avail\fP, \fB\-\-merge\-avail\fP \fIPackages-file\fP
  170. Update \fBdpkg\fP's and \fBdselect\fP's idea of which packages are
  171. available. With action \fB\-\-merge\-avail\fP, old information is
  172. combined with information from \fIPackages-file\fP. With action
  173. \fB\-\-update\-avail\fP, old information is replaced with the information
  174. in the \fIPackages-file\fP. The \fIPackages-file\fP distributed with
  175. Debian is simply named \fIPackages\fP. \fBdpkg\fP keeps its
  176. record of available packages in \fI/var/lib/dpkg/available\fP.
  177. A simpler one-shot command to retrieve and update the \fIavailable\fR
  178. file is \fBdselect update\fR. Note that this file is mostly useless
  179. if you don't use \fBdselect\fR but an APT-based frontend: APT has its
  180. own system to keep track of available packages.
  181. .TP
  182. \fB\-A\fP, \fB\-\-record\-avail\fP \fIpackage_file\fP...
  183. Update \fBdpkg\fP and \fBdselect\fP's idea of which packages are
  184. available with information from the package \fIpackage_file\fP. If
  185. \fB\-\-recursive\fP or \fB\-R\fP option is specified, \fIpackage_file\fP
  186. must refer to a directory instead.
  187. .TP
  188. .B \-\-forget\-old\-unavail
  189. Now \fBobsolete\fP and a no-op as \fBdpkg\fP will automatically forget
  190. uninstalled unavailable packages.
  191. .TP
  192. .B \-\-clear\-avail
  193. Erase the existing information about what packages are available.
  194. .TP
  195. \fB \-C\fP, \fB\-\-audit\fP
  196. Searches for packages that have been installed only partially on your
  197. system. \fBdpkg\fP will suggest what to do with them to get them
  198. working.
  199. .TP
  200. \fB\-\-get\-selections\fP [\fIpackage-name-pattern\fP...]
  201. Get list of package selections, and write it to stdout. Without a pattern,
  202. non-installed packages (i.e. those which have been previously purged)
  203. will not be shown.
  204. .TP
  205. .B \-\-set\-selections
  206. Set package selections using file read from stdin. This file should be
  207. in the format '<package> <state>', where state is one of install, hold,
  208. deinstall or purge. Blank lines and comment lines beginning with '#'
  209. are also permitted.
  210. .TP
  211. .B \-\-clear\-selections
  212. Set the requested state of every non-essential package to deinstall.
  213. This is intended to be used immediately before \-\-set\-selections, to
  214. deinstall any packages not in list given to \-\-set\-selections.
  215. .TP
  216. .B \-\-yet\-to\-unpack
  217. Searches for packages selected for installation, but which for some
  218. reason still haven't been installed.
  219. .TP
  220. .TP
  221. .B \-\-print\-architecture
  222. Print architecture of packages \fBdpkg\fP installs (for example, "i386").
  223. .TP
  224. .B \-\-compare\-versions \fIver1 op ver2\fP
  225. Compare version numbers, where \fIop\fP is a binary operator. \fBdpkg\fP
  226. returns success (zero result) if the specified condition is satisfied,
  227. and failure (nonzero result) otherwise. There are
  228. two groups of operators, which differ in how they treat an empty
  229. \fIver1\fP or \fIver2\fP. These treat an empty version as earlier than any
  230. version: \fBlt le eq ne ge gt\fP. These treat an empty version as later
  231. than any version: \fBlt\-nl le\-nl ge\-nl gt\-nl\fP. These are provided
  232. only for compatibility with control file syntax: \fB< << <= = >= >>
  233. >\fP.
  234. .TP
  235. .B \-\-command\-fd \fI<n>\fP
  236. Accept a series of commands on input file descriptor \fI<n>\fP. Note:
  237. additional options set on the command line, and thru this file descriptor,
  238. are not reset for subsequent commands executed during the same run.
  239. .TP
  240. .B \-\-help
  241. Display a brief help message.
  242. .TP
  243. .B \-\-force\-help
  244. Give help about the \fB\-\-force\-\fP\fIthing\fP options.
  245. .TP
  246. .BR \-Dh ", " \-\-debug=help
  247. Give help about debugging options.
  248. .TP
  249. \fB\-\-version\fP
  250. Display \fBdpkg\fP version information.
  251. .TP
  252. \fBdpkg\-deb actions\fP
  253. See \fBdpkg\-deb\fP(1) for more information about the following actions.
  254. .nf
  255. \fB\-b\fP, \fB\-\-build\fP \fIdirectory\fP [\fIarchive\fP|\fIdirectory\fP]
  256. Build a deb package.
  257. \fB\-c\fP, \fB\-\-contents\fP \fIarchive\fP
  258. List contents of a deb package.
  259. \fB\-e\fP, \fB\-\-control\fP \fIfilename\fP [\fIdirectory\fP]
  260. Extract control-information from a package.
  261. \fB\-x\fP, \fB\-\-extract\fP \fIarchive directory\fP
  262. Extract the files contained by package.
  263. \fB\-X\fP, \fB\-\-vextract\fP \fIarchive directory\fP
  264. Extract and display the filenames contained by a
  265. package.
  266. \fB\-f\fP, \fB\-\-field\fP \fIarchive\fP [\fIcontrol-field\fP...]
  267. Display control field(s) of a package.
  268. \fB\-\-fsys\-tarfile\fP \fIarchive\fP
  269. Display the filesystem tar-file contained by a
  270. Debian package.
  271. \fB\-I\fP, \fB\-\-info\fP \fIarchive\fP [\fIcontrol-file\fP...]
  272. Show information about a package.
  273. .fi
  274. .TP
  275. \fBdpkg\-query actions\fP
  276. See \fBdpkg\-query\fP(1) for more information about the following actions.
  277. .nf
  278. \fB\-l\fP, \fB\-\-list\fP \fIpackage-name-pattern\fP...
  279. List packages matching given pattern.
  280. \fB\-s\fP, \fB\-\-status\fP \fIpackage-name\fP...
  281. Report status of specified package.
  282. \fB\-L\fP, \fB\-\-listfiles\fP \fIpackage-name\fP...
  283. List files installed to your system from \fIpackage-name\fP.
  284. \fB\-S\fP, \fB\-\-search\fP \fIfilename-search-pattern\fP...
  285. Search for a filename from installed packages.
  286. \fB\-p\fP, \fB\-\-print\-avail\fP \fIpackage-name\fP...
  287. Display details about \fIpackage-name\fP, as found in
  288. \fI/var/lib/dpkg/available\fP. Users of APT-based frontends
  289. should use \fBapt\-cache show\fP \fIpackage-name\fP instead.
  290. .fi
  291. .
  292. .SH OPTIONS
  293. All options can be specified both on the command line and in the \fBdpkg\fP
  294. configuration file \fI/etc/dpkg/dpkg.cfg\fP or the files on the configuration
  295. directory \fI/etc/dpkg/dpkg.cfg.d/\fP. Each line in the configuration
  296. file is either an option (exactly the same as the command line option but
  297. without leading dashes) or a comment (if it starts with a \fB#\fR).
  298. .br
  299. .TP
  300. \fB\-\-abort\-after=\fP\fInumber\fP
  301. Change after how many errors \fBdpkg\fP will abort. The default is 50.
  302. .TP
  303. .BR \-B ", " \-\-auto\-deconfigure
  304. When a package is removed, there is a possibility that another
  305. installed package depended on the removed package. Specifying this
  306. option will cause automatic deconfiguration of the package which
  307. depended on the removed package.
  308. .TP
  309. \fB\-D\fIoctal\fP, \fB\-\-debug=\fP\fIoctal\fP
  310. Switch debugging on. \fIoctal\fP is formed by bitwise-orring desired
  311. values together from the list below (note that these values may change
  312. in future releases). \fB\-Dh\fP or \fB\-\-debug=help\fP display these
  313. debugging values.
  314. number description
  315. 1 Generally helpful progress information
  316. 2 Invocation and status of maintainer scripts
  317. 10 Output for each file processed
  318. 100 Lots of output for each file processed
  319. 20 Output for each configuration file
  320. 200 Lots of output for each configuration file
  321. 40 Dependencies and conflicts
  322. 400 Lots of dependencies/conflicts output
  323. 10000 Trigger activation and processing
  324. 20000 Lots of output regarding triggers
  325. 40000 Silly amounts of output regarding triggers
  326. 1000 Lots of drivel about e.g. the dpkg/info dir
  327. 2000 Insane amounts of drivel
  328. .TP
  329. \fB\-\-force\-\fP\fIthings\fP, \fB\-\-no\-force\-\fP\fIthings\fP, \fB\-\-refuse\-\fP\fIthings\fP
  330. Force or refuse (\fBno\-force\fP and \fBrefuse\fP mean the same thing)
  331. to do some things. \fIthings\fP is a comma separated list of things
  332. specified below. \fB\-\-force\-help\fP displays a message describing them.
  333. Things marked with (*) are forced by default.
  334. \fIWarning: These options are mostly intended to be used by experts
  335. only. Using them without fully understanding their effects may break
  336. your whole system.\fP
  337. \fBall\fP:
  338. Turns on (or off) all force options.
  339. \fBdowngrade\fP(*):
  340. Install a package, even if newer version of it is already installed.
  341. \fIWarning: At present dpkg does not do any dependency
  342. checking on downgrades and therefore will not warn you
  343. if the downgrade breaks the dependency of some other
  344. package. This can have serious side effects, downgrading
  345. essential system components can even make your whole
  346. system unusable. Use with care.\fP
  347. \fBconfigure\-any\fP:
  348. Configure also any unpacked but unconfigured packages on which the current
  349. package depends.
  350. \fBhold\fP:
  351. Process packages even when marked "hold".
  352. \fBremove\-reinstreq\fP:
  353. Remove a package, even if it's broken and marked to require
  354. reinstallation. This may, for example, cause parts of the package to
  355. remain on the system, which will then be forgotten by \fBdpkg\fP.
  356. \fBremove\-essential\fP:
  357. Remove, even if the package is considered essential. Essential
  358. packages contain mostly very basic Unix commands. Removing them might
  359. cause the whole system to stop working, so use with caution.
  360. \fBdepends\fP:
  361. Turn all dependency problems into warnings.
  362. \fBdepends\-version\fP:
  363. Don't care about versions when checking dependencies.
  364. \fBbreaks\fP:
  365. Install, even if this would break another package.
  366. \fBconflicts\fP:
  367. Install, even if it conflicts with another package. This is dangerous,
  368. for it will usually cause overwriting of some files.
  369. \fBconfmiss\fP:
  370. Always install a missing conffile. This is dangerous,
  371. since it means not preserving a change (removing) made to the
  372. file.
  373. \fBconfnew\fP:
  374. If a conffile has been modified always install the new version without
  375. prompting, unless the \fB\-\-force\-confdef\fP is also specified, in
  376. which case the default action is preferred.
  377. \fBconfold\fP:
  378. If a conffile has been modified always keep the old version without
  379. prompting, unless the \fB\-\-force\-confdef\fP is also specified, in
  380. which case the default action is preferred.
  381. \fBconfdef\fP:
  382. If a conffile has been modified always choose the default action. If
  383. there is no default action it will stop to ask the user unless
  384. \fB\-\-force\-confnew\fP or \fB\-\-force\-confold\fP is also been given, in
  385. which case it will use that to decide the final action.
  386. \fBoverwrite\fP:
  387. Overwrite one package's file with another's file.
  388. \fBoverwrite\-dir\fP
  389. Overwrite one package's directory with another's file.
  390. \fBoverwrite\-diverted\fP:
  391. Overwrite a diverted file with an undiverted version.
  392. \fBarchitecture\fP:
  393. Process even packages with the wrong architecture.
  394. \fBbad\-path\fP:
  395. \fBPATH\fP is missing important programs, so problems are likely.
  396. \fBnot\-root\fP:
  397. Try to (de)install things even when not root.
  398. \fBbad\-verify\fP:
  399. Install a package even if it fails authenticity check.
  400. .TP
  401. \fB\-\-ignore\-depends\fP=\fIpackage\fP,...
  402. Ignore dependency-checking for specified packages (actually, checking is
  403. performed, but only warnings about conflicts are given, nothing else).
  404. .TP
  405. \fB\-\-new\fP, \fB\-\-old\fP
  406. Select new or old binary package format. This is a \fBdpkg\-deb\fP(1)
  407. option.
  408. .TP
  409. .B \-\-nocheck
  410. Don't read or check contents of control file while building a package.
  411. This is a \fBdpkg\-deb\fP(1) option.
  412. .TP
  413. \fB\-\-no\-act\fP, \fB\-\-dry\-run\fP, \fB\-\-simulate\fP
  414. Do everything which is supposed to be done, but don't write any
  415. changes. This is used to see what would happen with the specified
  416. action, without actually modifying anything.
  417. Be sure to give \fB\-\-no\-act\fP before the action-parameter, or you might
  418. end up with undesirable results. (e.g. \fBdpkg \-\-purge foo
  419. \-\-no\-act\fP will first purge package foo and then try to purge package
  420. \-\-no\-act, even though you probably expected it to actually do nothing)
  421. .TP
  422. \fB\-R\fP, \fB\-\-recursive\fP
  423. Recursively handle all regular files matching pattern \fB*.deb\fP
  424. found at specified directories and all of its subdirectories. This can
  425. be used with \fB\-i\fP, \fB\-A\fP, \fB\-\-install\fP, \fB\-\-unpack\fP and
  426. \fB\-\-avail\fP actions.
  427. .TP
  428. \fB\-G\fP
  429. Don't install a package if a newer version of the same package is already
  430. installed. This is an alias of \fB\-\-refuse\-downgrade\fP.
  431. .TP
  432. .BI \-\-admindir= dir
  433. Change default administrative directory, which contains many files that
  434. give information about status of installed or uninstalled packages, etc.
  435. (Defaults to \fI/var/lib/dpkg\fP)
  436. .TP
  437. .BI \-\-instdir= dir
  438. Change default installation directory which refers to the directory where
  439. packages are to be installed. \fBinstdir\fP is also the directory passed
  440. to \fBchroot\fP(2) before running package's installation scripts, which
  441. means that the scripts see \fBinstdir\fP as a root directory.
  442. (Defaults to \fI/\fP)
  443. .TP
  444. .BI \-\-root= dir
  445. Changing \fBroot\fP changes \fBinstdir\fP to \fIdir\fP and \fBadmindir\fP
  446. to \fIdir\fP\fB/var/lib/dpkg\fP.
  447. .TP
  448. \fB\-O\fP, \fB\-\-selected\-only\fP
  449. Only process the packages that are selected for installation. The
  450. actual marking is done with \fBdselect\fP or by \fBdpkg\fP, when it
  451. handles packages. For example, when a package is removed, it will
  452. be marked selected for deinstallation.
  453. .TP
  454. .BR \-E ", " \-\-skip\-same\-version
  455. Don't install the package if the same version of the package is already
  456. installed.
  457. .P
  458. .BI \-\-pre\-invoke= command
  459. .br
  460. .BI \-\-post\-invoke= command
  461. .RS
  462. Set an invoke hook \fIcommand\fP to be run via \*(lqsh \-c\*(rq before or
  463. after the dpkg run for the \fIunpack\fP, \fIconfigure\fP, \fIinstall\fP,
  464. \fItriggers\-only\fP, \fIremove\fP and \fIpurge\fP dpkg actions. This
  465. option can be specified multiple times. The order the options are specified
  466. is preserved, with the ones from the configuration files taking precedence.
  467. The environment variable \fBDPKG_HOOK_ACTION\fP is set for the hooks to the
  468. current dpkg action. Note: front-ends might call dpkg several times per
  469. invocation, which might run the hooks more times than expected.
  470. .RE
  471. .TP
  472. \fB\-\-status\-fd \fR\fIn\fR
  473. Send machine-readable package status and progress information to file
  474. descriptor \fIn\fP. This option can be specified multiple times. The
  475. information is generally one record per line, in one of the following
  476. forms:
  477. .RS
  478. .TP
  479. .BI "status: " package ": " status
  480. Package status changed; \fIstatus\fR is as in the status file.
  481. .TP
  482. .BI "status: " package " : error : " extended-error-message
  483. An error occurred. Unfortunately at the time of writing
  484. \fIextended-error-message\fR can contain newlines, although in locales
  485. where the translators have not made mistakes every newline is followed
  486. by at least one space.
  487. .TP
  488. .BI "status: " file " : conffile-prompt : '" real-old "' '" real-new "' " useredited " " distedited
  489. User is being asked a conffile question.
  490. .TP
  491. .BI "processing: " stage ": " package
  492. Sent just before a processing stage starts. \fIstage\fR is one of
  493. .BR upgrade ", " install " (both sent before unpacking),"
  494. .BR configure ", " trigproc ", " disappear ", " remove ", " purge .
  495. .RE
  496. .TP
  497. \fB\-\-log=\fP\fIfilename\fP
  498. Log status change updates and actions to \fIfilename\fP, instead of
  499. the default \fI/var/log/dpkg.log\fP. If this option is given multiple
  500. times, the last filename is used. Log messages are of the form
  501. `YYYY-MM-DD HH:MM:SS status
  502. <state> <pkg> <installed-version>' for status change updates;
  503. `YYYY-MM-DD HH:MM:SS <action> <pkg> <installed-version>
  504. <available-version>' for actions where \fI<action>\fP is one of install,
  505. upgrade, remove, purge; and `YYYY-MM-DD HH:MM:SS conffile <filename>
  506. <decision>' for conffile changes where \fI<decision>\fP is either install
  507. or keep.
  508. .TP
  509. \fB\-\-no\-debsig\fP
  510. Do not try to verify package signatures.
  511. .TP
  512. \fB\-\-no\-triggers\fP
  513. Do not run any triggers in this run (activations will still be recorded).
  514. If used with \fB\-\-configure\fP \fIpackage\fP or
  515. \fB\-\-triggers\-only\fP \fIpackage\fP then the named package postinst
  516. will still be run even if only a triggers run is needed. Use of this option
  517. may leave packages in the improper \fBtriggers\-awaited\fP and
  518. \fBtriggers\-pending\fP states. This can be fixed later by running:
  519. \fBdpkg \-\-configure \-\-pending\fP.
  520. .TP
  521. \fB\-\-triggers\fP
  522. Cancels a previous \fB\-\-no\-triggers\fP.
  523. .
  524. .SH FILES
  525. .TP
  526. .I /etc/dpkg/dpkg.cfg
  527. Configuration file with default options.
  528. .TP
  529. .I /var/log/dpkg.log
  530. Default log file (see \fI/etc/dpkg/dpkg.cfg\fP(5) and option
  531. \fB\-\-log\fP).
  532. .P
  533. The other files listed below are in their default directories, see option
  534. \fB\-\-admindir\fP to see how to change locations of these files.
  535. .TP
  536. .I /var/lib/dpkg/available
  537. List of available packages.
  538. .TP
  539. .I /var/lib/dpkg/status
  540. Statuses of available packages. This file contains information about
  541. whether a package is marked for removing or not, whether it is
  542. installed or not, etc. See section \fBINFORMATION ABOUT PACKAGES\fP
  543. for more info.
  544. The status file is backed up daily in \fI/var/backups\fP. It can be
  545. useful if it's lost or corrupted due to filesystems troubles.
  546. .P
  547. The following files are components of a binary package. See \fBdeb\fP(5)
  548. for more information about them:
  549. .TP
  550. .I control
  551. .TP
  552. .I conffiles
  553. .TP
  554. .I preinst
  555. .TP
  556. .I postinst
  557. .TP
  558. .I prerm
  559. .TP
  560. .I postrm
  561. .
  562. .SH ENVIRONMENT
  563. .TP
  564. .B HOME
  565. If set, \fBdpkg\fP will use it as the directory from which to read the user
  566. specific configuration file.
  567. .TP
  568. .B TMPDIR
  569. If set, \fBdpkg\fP will use it as the directory in which to create
  570. temporary files and directories.
  571. .TP
  572. .B PAGER
  573. The program \fBdpkg\fP will execute when displaying the conffiles.
  574. .TP
  575. .B SHELL
  576. The program \fBdpkg\fP will execute when starting a new shell.
  577. .TP
  578. .B COLUMNS
  579. Sets the number of columns \fBdpkg\fP should use when displaying formatted
  580. text. Currently only used by \-l.
  581. .TP
  582. .B DPKG_SHELL_REASON
  583. Defined by \fBdpkg\fP on the shell spawned on the conffile prompt to
  584. examine the situation. Current valid value: \fBconffile\-prompt\fP.
  585. .TP
  586. .B DPKG_CONFFILE_OLD
  587. Defined by \fBdpkg\fP on the shell spawned on the conffile prompt to
  588. examine the situation. Contains the path to the old conffile.
  589. .TP
  590. .B DPKG_CONFFILE_NEW
  591. Defined by \fBdpkg\fP on the shell spawned on the conffile prompt to
  592. examine the situation. Contains the path to the new conffile.
  593. .TP
  594. .B DPKG_RUNNING_VERSION
  595. Defined by \fBdpkg\fP on the maintainer script environment to the
  596. version of the currently running \fBdpkg\fP instance.
  597. .TP
  598. .B DPKG_LIBDIR
  599. Defined by \fBdpkg\fP on the maintainer script environment to the
  600. private library directory of the currently running \fBdpkg\fP instance.
  601. .TP
  602. .B DPKG_MAINTSCRIPT_PACKAGE
  603. Defined by \fBdpkg\fP on the maintainer script environment to the
  604. package name being handled.
  605. .TP
  606. .B DPKG_MAINTSCRIPT_ARCH
  607. Defined by \fBdpkg\fP on the maintainer script environment to the
  608. architecture the package got built for.
  609. .TP
  610. .B DPKG_MAINTSCRIPT_NAME
  611. Defined by \fBdpkg\fP on the maintainer script environment to the
  612. name of the script running (preinst, postinst, prerm, postrm).
  613. .
  614. .SH EXAMPLES
  615. To list packages related to the editor \fBvi\fP(1):
  616. .br
  617. \fB dpkg \-l \(aq*vi*\(aq\fP
  618. .br
  619. To see the entries in \fI/var/lib/dpkg/available\fP of two packages:
  620. .br
  621. \fB dpkg \-\-print\-avail elvis vim | less\fP
  622. .br
  623. To search the listing of packages yourself:
  624. .br
  625. \fB less /var/lib/dpkg/available\fP
  626. .br
  627. To remove an installed elvis package:
  628. .br
  629. \fB dpkg \-r elvis\fP
  630. .br
  631. To install a package, you first need to find it in an archive or
  632. CDROM. The "available" file shows that the vim package is in section
  633. "editors":
  634. .br
  635. \fB cd /cdrom/pool/main/v/vim\fP
  636. \fB dpkg \-i vim_4.5\-3.deb\fP
  637. .br
  638. To make a local copy of the package selection states:
  639. .br
  640. \fB dpkg \-\-get\-selections >myselections\fP
  641. .br
  642. You might transfer this file to another computer, and install it there
  643. with:
  644. .br
  645. \fB dpkg \-\-clear\-selections\fP
  646. \fB dpkg \-\-set\-selections <myselections\fP
  647. .br
  648. Note that this will not actually install or remove anything, but just
  649. set the selection state on the requested packages. You will need some
  650. other application to actually download and install the requested
  651. packages. For example, run \fBapt\-get dselect\-upgrade\fP.
  652. Ordinarily, you will find that \fBdselect\fP(1) provides a more
  653. convenient way to modify the package selection states.
  654. .br
  655. .
  656. .SH ADDITIONAL FUNCTIONALITY
  657. Additional functionality can be gained by installing any of the
  658. following packages: \fBapt\fR, \fBaptitude\fR and \fBdebsums\fR.
  659. .
  660. .SH SEE ALSO
  661. \fBaptitude\fP(1),
  662. \fBapt\fP(1),
  663. \fBdselect\fP(1),
  664. \fBdpkg\-deb\fP(1),
  665. \fBdpkg\-query\fP(1),
  666. \fBdeb\fP(5),
  667. \fBdeb\-control\fP(5),
  668. \fBdpkg.cfg\fP(5),
  669. and
  670. \fBdpkg\-reconfigure\fP(8).
  671. .
  672. .SH BUGS
  673. \fB\-\-no\-act\fP usually gives less information than might be helpful.
  674. .
  675. .SH AUTHORS
  676. See \fI/usr/share/doc/dpkg/THANKS\fP for the list of people who have
  677. contributed to \fBdpkg\fP.