dpkg.1 28 KB

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