dpkg.1 29 KB

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