dpkg.1 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. .TH dpkg 1 "2007-07-18" "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 \fBdselect\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 be 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 installed
  49. The package is unpacked and configured OK.
  50. .TP
  51. .B half\-installed
  52. The installation of the package has been started, but not completed for
  53. some reason.
  54. .TP
  55. .B not\-installed
  56. The package is not installed on your system.
  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 config\-files
  66. Only the configuration files of the package exist on the system.
  67. .SS PACKAGE SELECTION STATES
  68. .TP
  69. .B install
  70. The package is selected for installation.
  71. .TP
  72. .B deinstall
  73. The package is selected for deinstallation (i.e. we want to remove all
  74. files, except configuration files).
  75. .TP
  76. .B purge
  77. The package is selected to be purged (i.e. we want to remove everything,
  78. even configuration files).
  79. .SS PACKAGE FLAGS
  80. .TP
  81. .B hold
  82. A package marked to be on \fBhold\fP is not handled by \fBdpkg\fP,
  83. unless forced to do that with option \fB\-\-force\-hold\fP.
  84. .TP
  85. .B reinst\-required
  86. A package marked \fBreinst\-required\fP is broken and requires
  87. reinstallation. These packages cannot be removed, unless forced with
  88. option \fB\-\-force\-remove\-reinstreq\fP.
  89. .
  90. .SH ACTIONS
  91. .TP
  92. \fB\-i\fP, \fB\-\-install\fP \fIpackage_file\fP...
  93. Install the package. If \fB\-\-recursive\fP or \fB\-R\fP option is
  94. specified, \fIpackage_file\fP must refer to a directory instead.
  95. Installation consists of the following steps:
  96. .br
  97. \fB1.\fP Extract the control files of the new package.
  98. .br
  99. \fB2.\fP If another version of the same package was installed before
  100. the new installation, execute \fIprerm\fP script of the old package.
  101. .br
  102. \fB3.\fP Run \fIpreinst\fP script, if provided by the package.
  103. .br
  104. \fB4.\fP Unpack the new files, and at the same time back up the old
  105. files, so that if something goes wrong, they can be restored.
  106. .br
  107. \fB5.\fP If another version of the same package was installed before
  108. the new installation, execute the \fIpostrm\fP script of the old
  109. package. Note that this script is executed after the \fIpreinst\fP
  110. script of the new package, because new files are written at the same
  111. time old files are removed.
  112. .br
  113. \fB6.\fP Configure the package. See \fB\-\-configure\fP for detailed
  114. information about how this is done.
  115. .TP
  116. \fB\-\-unpack \fP\fIpackage_file\fP...
  117. Unpack the package, but don't configure it. If \fB\-\-recursive\fP or
  118. \fB\-R\fP option is specified, \fIpackage_file\fP must refer to a
  119. directory instead.
  120. .TP
  121. \fB\-\-configure \fP\fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  122. Reconfigure an unpacked package. If \fB\-a\fP or \fB\-\-pending\fP is
  123. given instead of \fIpackage\fP, all unpacked but unconfigured
  124. packages are configured.
  125. Configuring consists of the following steps:
  126. .br
  127. \fB1.\fP Unpack the configuration files, and at the same time back up
  128. the old configuration files, so that they can be restored if
  129. something goes wrong.
  130. .br
  131. \fB2.\fP Run \fIpostinst\fP script, if provided by the package.
  132. .TP
  133. \fB\-r\fP, \fB\-\-remove\fP, \fB\-P\fP, \fB\-\-purge \fP\fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  134. Remove an installed package. \fB\-r\fP or \fB\-\-remove\fP remove
  135. everything except configuration files. This may avoid having to
  136. reconfigure the package if it is reinstalled later. (Configuration
  137. files are the files listed in the \fIdebian/conffiles\fP control
  138. file). \fB\-P\fP or \fB\-\-purge\fP removes everything, including configuration
  139. files. If \fB\-a\fP or \fB\-\-pending\fP is given instead of a package
  140. name, then all packages unpacked, but marked to be removed or purged
  141. in file \fI/var/lib/dpkg/status\fP, are removed or purged,
  142. respectively.
  143. Removing of a package consists of the following steps:
  144. .br
  145. \fB1.\fP Run \fIprerm\fP script
  146. .br
  147. \fB2.\fP Remove the installed files
  148. .br
  149. \fB3.\fP Run \fIpostrm\fP script
  150. .br
  151. .TP
  152. \fB\-\-update\-avail\fP, \fB\-\-merge\-avail\fP \fIPackages-file\fP
  153. Update \fBdpkg\fP's and \fBdselect\fP's idea of which packages are
  154. available. With action \fB\-\-merge\-avail\fP, old information is
  155. combined with information from \fIPackages-file\fP. With action
  156. \fB\-\-update\-avail\fP, old information is replaced with the information
  157. in the \fIPackages-file\fP. The \fIPackages-file\fP distributed with
  158. Debian is simply named \fIPackages\fP. \fBdpkg\fP keeps its
  159. record of available packages in \fI/var/lib/dpkg/available\fP.
  160. A simpler one-shot command to retrieve and update the \fIavailable\fR
  161. file is \fBdselect update\fR.
  162. .TP
  163. \fB\-A\fP, \fB\-\-record\-avail\fP \fIpackage_file\fP...
  164. Update \fBdpkg\fP and \fBdselect\fP's idea of which packages are
  165. available with information from the package \fIpackage_file\fP. If
  166. \fB\-\-recursive\fP or \fB\-R\fP option is specified, \fIpackage_file\fP
  167. must refer to a directory instead.
  168. .TP
  169. .B \-\-forget\-old\-unavail
  170. Forget about uninstalled unavailable packages.
  171. .TP
  172. .B \-\-clear\-avail
  173. Erase the existing information about what packages are available.
  174. .TP
  175. \fB \-C\fP, \fB\-\-audit\fP
  176. Searches for packages that have been installed only partially on your
  177. system. \fBdpkg\fP will suggest what to do with them to get them
  178. working.
  179. .TP
  180. \fB\-\-get\-selections\fP [\fIpackage-name-pattern\fP...]
  181. Get list of package selections, and write it to stdout. Without a pattern,
  182. packages marked with state purge will not be shown.
  183. .TP
  184. .B \-\-set\-selections
  185. Set package selections using file read from stdin. This file should be
  186. in the format '<package> <state>', where state is one of install, hold,
  187. deinstall or purge. Blank lines and comment lines beginning with '#'
  188. are also permitted.
  189. .TP
  190. .B \-\-clear\-selections
  191. Set the requested state of every non-essential package to deinstall.
  192. This is intended to be used immediately before \-\-set\-selections, to
  193. deinstall any packages not in list given to \-\-set\-selections.
  194. .TP
  195. .B \-\-yet\-to\-unpack
  196. Searches for packages selected for installation, but which for some
  197. reason still haven't been installed.
  198. .TP
  199. .TP
  200. .B \-\-print\-architecture
  201. Print architecture of packages \fBdpkg\fP installs (for example, "i386").
  202. .TP
  203. .B \-\-compare\-versions \fIver1 op ver2\fP
  204. Compare version numbers, where \fIop\fP is a binary operator. \fBdpkg\fP
  205. returns success (zero result) if the specified condition is satisfied,
  206. and failure (nonzero result) otherwise. There are
  207. two groups of operators, which differ in how they treat an empty
  208. \fIver1\fP or \fIver2\fP. These treat an empty version as earlier than any
  209. version: \fBlt le eq ne ge gt\fP. These treat an empty version as later
  210. than any version: \fBlt\-nl le\-nl ge\-nl gt\-nl\fP. These are provided
  211. only for compatibility with control file syntax: \fB< << <= = >= >>
  212. >\fP.
  213. .TP
  214. .B \-\-command\-fd \fI<n>\fP
  215. Accept a series of commands on input file descriptor \fI<n>\fP. Note:
  216. additional options set on the command line, and thru this file descriptor,
  217. are not reset for subsequent commands executed during the same run.
  218. .TP
  219. .B \-\-help
  220. Display a brief help message.
  221. .TP
  222. .B \-\-force\-help
  223. Give help about the \fB\-\-force\-\fP\fIthing\fP options.
  224. .TP
  225. .BR \-Dh ", " \-\-debug=help
  226. Give help about debugging options.
  227. .TP
  228. \fB\-\-licence\fP, \fB\-\-license\fP
  229. Display \fBdpkg\fP licence.
  230. .TP
  231. \fB\-\-version\fP
  232. Display \fBdpkg\fP version information.
  233. .TP
  234. \fBdpkg\-deb actions\fP
  235. See \fBdpkg\-deb\fP(1) for more information about the following actions.
  236. .nf
  237. \fB\-b\fP, \fB\-\-build\fP \fIdirectory\fP [\fIarchive\fP|\fIdirectory\fP]
  238. Build a deb package.
  239. \fB\-c\fP, \fB\-\-contents\fP \fIarchive\fP
  240. List contents of a deb package.
  241. \fB\-e\fP, \fB\-\-control\fP \fIfilename\fP [\fIdirectory\fP]
  242. Extract control-information from a package.
  243. \fB\-x\fP, \fB\-\-extract\fP \fIarchive directory\fP
  244. Extract the files contained by package.
  245. \fB\-X\fP, \fB\-\-vextract\fP \fIarchive directory\fP
  246. Extract and display the filenames contained by a
  247. package.
  248. \fB\-f\fP, \fB\-\-field\fP \fIarchive\fP [\fIcontrol-field\fP...]
  249. Display control field(s) of a package.
  250. \fB\-\-fsys\-tarfile\fP \fIarchive\fP
  251. Display the filesystem tar-file contained by a
  252. Debian package.
  253. \fB\-I\fP, \fB\-\-info\fP \fIarchive\fP [\fIcontrol-file\fP...]
  254. Show information about a package.
  255. .fi
  256. .TP
  257. \fBdpkg\-query actions\fP
  258. See \fBdpkg\-query\fP(1) for more information about the following actions.
  259. .nf
  260. \fB\-l\fP, \fB\-\-list\fP \fIpackage-name-pattern\fP...
  261. List packages matching given pattern.
  262. \fB\-s\fP, \fB\-\-status\fP \fIpackage-name\fP...
  263. Report status of specified package.
  264. \fB\-L\fP, \fB\-\-listfiles\fP \fIpackage-name\fP...
  265. List files installed to your system from \fIpackage-name\fP.
  266. \fB\-S\fP, \fB\-\-search\fP \fIfilename-search-pattern\fP...
  267. Search for a filename from installed packages.
  268. \fB\-p\fP, \fB\-\-print\-avail\fP \fIpackage-name\fP...
  269. Display details about \fIpackage-name\fP, as found in
  270. \fI/var/lib/dpkg/available\fP.
  271. .fi
  272. .
  273. .SH OPTIONS
  274. All options can be specified both on the command line and in the \fBdpkg\fP
  275. configuration file \fI/etc/dpkg/dpkg.cfg\fP. Each line in the configuration
  276. file is either an option (exactly the same as the command line option but
  277. without leading dashes) or a comment (if it starts with a \fB#\fR).
  278. .br
  279. .TP
  280. \fB\-\-abort\-after=\fP\fInumber\fP
  281. Change after how many errors \fBdpkg\fP will abort. The default is 50.
  282. .TP
  283. .BR \-B ", " \-\-auto\-deconfigure
  284. When a package is removed, there is a possibility that another
  285. installed package depended on the removed package. Specifying this
  286. option will cause automatic deconfiguration of the package which
  287. depended on the removed package.
  288. .TP
  289. \fB\-D\fIoctal\fP, \fB\-\-debug=\fP\fIoctal\fP
  290. Switch debugging on. \fIoctal\fP is formed by bitwise-orring desired
  291. values together from the list below (note that these values may change
  292. in future releases). \fB\-Dh\fP or \fB\-\-debug=help\fP display these
  293. debugging values.
  294. number description
  295. 1 Generally helpful progress information
  296. 2 Invocation and status of maintainer scripts
  297. 10 Output for each file processed
  298. 100 Lots of output for each file processed
  299. 20 Output for each configuration file
  300. 200 Lots of output for each configuration file
  301. 40 Dependencies and conflicts
  302. 400 Lots of dependencies/conflicts output
  303. 1000 Lots of drivel about e.g. the dpkg/info dir
  304. 2000 Insane amounts of drivel
  305. .TP
  306. \fB\-\-force\-\fP\fIthings\fP, \fB\-\-no\-force\-\fP\fIthings\fP, \fB\-\-refuse\-\fP\fIthings\fP
  307. Force or refuse (\fBno\-force\fP and \fBrefuse\fP mean the same thing)
  308. to do some things. \fIthings\fP is a comma separated list of things
  309. specified below. \fB\-\-force\-help\fP displays a message describing them.
  310. Things marked with (*) are forced by default.
  311. \fIWarning: These options are mostly intended to be used by experts
  312. only. Using them without fully understanding their effects may break
  313. your whole system.\fP
  314. \fBall\fP:
  315. Turns on (or off) all force options.
  316. \fBdowngrade\fP(*):
  317. Install a package, even if newer version of it is already installed.
  318. \fIWarning: At present dpkg does not do any dependency
  319. checking on downgrades and therefore will not warn you
  320. if the downgrade breaks the dependency of some other
  321. package. This can have serious side effects, downgrading
  322. essential system components can even make your whole
  323. system unusable. Use with care.\fP
  324. \fBconfigure\-any\fP:
  325. Configure also any unpacked but unconfigured packages on which the current
  326. package depends.
  327. \fBhold\fP:
  328. Process packages even when marked "hold".
  329. \fBremove\-reinstreq\fP:
  330. Remove a package, even if it's broken and marked to require
  331. reinstallation. This may, for example, cause parts of the package to
  332. remain on the system, which will then be forgotten by \fBdpkg\fP.
  333. \fBremove\-essential\fP:
  334. Remove, even if the package is considered essential. Essential
  335. packages contain mostly very basic Unix commands. Removing them might
  336. cause the whole system to stop working, so use with caution.
  337. \fBdepends\fP:
  338. Turn all dependency problems into warnings.
  339. \fBdepends\-version\fP:
  340. Don't care about versions when checking dependencies.
  341. \fBbreaks\fP:
  342. Install, even if this would break another package.
  343. \fBconflicts\fP:
  344. Install, even if it conflicts with another package. This is dangerous,
  345. for it will usually cause overwriting of some files.
  346. \fBconfmiss\fP:
  347. Always install a missing configuration file. This is dangerous,
  348. since it means not preserving a change (removing) made to the
  349. file.
  350. \fBconfnew\fP:
  351. If a conffile has been modified always install the new version without
  352. prompting, unless the \fB\-\-force\-confdef\fP is also specified, in
  353. which case the default action is preferred.
  354. \fBconfold\fP:
  355. If a conffile has been modified always keep the old version without
  356. prompting, unless the \fB\-\-force\-confdef\fP is also specified, in
  357. which case the default action is preferred.
  358. \fBconfdef\fP:
  359. If a conffile has been modified always choose the default action. If
  360. there is no default action it will stop to ask the user unless
  361. \fB\-\-force\-confnew\fP or \fB\-\-force\-confold\fP is also been given, in
  362. which case it will use that to decide the final action.
  363. \fBoverwrite\fP:
  364. Overwrite one package's file with another's file.
  365. \fBoverwrite\-dir\fP
  366. Overwrite one package's directory with another's file.
  367. \fBoverwrite\-diverted\fP:
  368. Overwrite a diverted file with an undiverted version.
  369. \fBarchitecture\fP:
  370. Process even packages with the wrong architecture.
  371. \fBbad\-path\fP:
  372. \fBPATH\fP is missing important programs, so problems are likely.
  373. \fBnot\-root\fP:
  374. Try to (de)install things even when not root.
  375. \fBbad\-verify\fP:
  376. Install a package even if it fails authenticity check.
  377. .TP
  378. \fB\-\-ignore\-depends\fP=\fIpackage\fP,...
  379. Ignore dependency-checking for specified packages (actually, checking is
  380. performed, but only warnings about conflicts are given, nothing else).
  381. .TP
  382. \fB\-\-new\fP, \fB\-\-old\fP
  383. Select new or old binary package format. This is a \fBdpkg\-deb\fP(1)
  384. option.
  385. .TP
  386. .B \-\-nocheck
  387. Don't read or check contents of control file while building a package.
  388. This is a \fBdpkg\-deb\fP(1) option.
  389. .TP
  390. \fB\-\-no\-act\fP, \fB\-\-dry\-run\fP, \fB\-\-simulate\fP
  391. Do everything which is supposed to be done, but don't write any
  392. changes. This is used to see what would happen with the specified
  393. action, without actually modifying anything.
  394. Be sure to give \fB\-\-no\-act\fP before the action-parameter, or you might
  395. end up with undesirable results. (e.g. \fBdpkg \-\-purge foo
  396. \-\-no\-act\fP will first purge package foo and then try to purge package
  397. \-\-no\-act, even though you probably expected it to actually do nothing)
  398. .TP
  399. \fB\-R\fP, \fB\-\-recursive\fP
  400. Recursively handle all regular files matching pattern \fB*.deb\fP
  401. found at specified directories and all of its subdirectories. This can
  402. be used with \fB\-i\fP, \fB\-A\fP, \fB\-\-install\fP, \fB\-\-unpack\fP and
  403. \fB\-\-avail\fP actions.
  404. .TP
  405. \fB\-G\fP
  406. Don't install a package if a newer version of the same package is already
  407. installed. This is an alias of \fB\-\-refuse\-downgrade\fP.
  408. .TP
  409. .BI \-\-admindir= dir
  410. Change default administrative directory, which contains many files that
  411. give information about status of installed or uninstalled packages, etc.
  412. (Defaults to \fI/var/lib/dpkg\fP)
  413. .TP
  414. .BI \-\-instdir= dir
  415. Change default installation directory which refers to the directory where
  416. packages are to be installed. \fBinstdir\fP is also the directory passed
  417. to \fBchroot\fP(2) before running package's installation scripts, which
  418. means that the scripts see \fBinstdir\fP as a root directory.
  419. (Defaults to \fI/\fP)
  420. .TP
  421. .BI \-\-root= dir
  422. Changing \fBroot\fP changes \fBinstdir\fP to \fIdir\fP and \fBadmindir\fP
  423. to \fIdir\fP\fB/var/lib/dpkg\fP.
  424. .TP
  425. \fB\-O\fP, \fB\-\-selected\-only\fP
  426. Only process the packages that are selected for installation. The
  427. actual marking is done with \fBdselect\fP or by \fBdpkg\fP, when it
  428. handles packages. For example, when a package is removed, it will
  429. be marked selected for deinstallation.
  430. .TP
  431. .BR \-E ", " \-\-skip\-same\-version
  432. Don't install the package if the same version of the package is already
  433. installed.
  434. .TP
  435. \fB\-\-status\-fd \fP\fI<n>\fP
  436. Send package status info to file descriptor \fI<n>\fP. This can be given
  437. multiple times. Status updates are of the form `status: <pkg>: <pkg state>'.
  438. Errors are reported as `status: <pkg>: error: extend-error-message'.
  439. Configuration file conflicts are reported as
  440. `status: conffile-prompt: conffile : 'current-conffile' 'new-conffile' useredited distedited'.
  441. .TP
  442. \fB\-\-log=\fP\fIfilename\fP
  443. Log status change updates and actions to \fIfilename\fP, instead of
  444. the default \fI/var/log/dpkg.log\fP. If this option is given multiple
  445. times, the last filename is used. Log messages are of the form
  446. `YYYY-MM-DD HH:MM:SS status
  447. <state> <pkg> <installed-version>' for status change updates;
  448. `YYYY-MM-DD HH:MM:SS <action> <pkg> <installed-version>
  449. <available-version>' for actions where \fI<action>\fP is one of install,
  450. upgrade, remove, purge; and `YYYY-MM-DD HH:MM:SS conffile <filename>
  451. <decision>' for conffile changes where \fI<decision>\fP is either install
  452. or keep.
  453. .TP
  454. \fB\-\-no\-debsig\fP
  455. Do not try to verify package signatures.
  456. .
  457. .SH FILES
  458. .TP
  459. .I /etc/dpkg/dpkg.cfg
  460. Configuration file with default options.
  461. .TP
  462. .I /var/log/dpkg.log
  463. Default log file (see \fI/etc/dpkg/dpkg.cfg\fP(5) and option
  464. \fB\-\-log\fP).
  465. .P
  466. The other files listed below are in their default directories, see option
  467. \fB\-\-admindir\fP to see how to change locations of these files.
  468. .TP
  469. .I /var/lib/dpkg/available
  470. List of available packages.
  471. .TP
  472. .I /var/lib/dpkg/status
  473. Statuses of available packages. This file contains information about
  474. whether a package is marked for removing or not, whether it is
  475. installed or not, etc. See section \fBINFORMATION ABOUT PACKAGES\fP
  476. for more info.
  477. .P
  478. The following files are components of a binary package. See \fBdeb\fP(5)
  479. for more information about them:
  480. .TP
  481. .I control
  482. .TP
  483. .I conffiles
  484. .TP
  485. .I preinst
  486. .TP
  487. .I postinst
  488. .TP
  489. .I prerm
  490. .TP
  491. .I postrm
  492. .
  493. .SH ENVIRONMENT VARIABLES
  494. .TP
  495. .B DPKG_NO_TSTP
  496. Define this to something if you prefer \fBdpkg\fP starting a new
  497. shell rather than suspending itself, while doing a shell escape.
  498. .TP
  499. .B SHELL
  500. The program \fBdpkg\fP will execute when starting a new shell.
  501. .TP
  502. .B COLUMNS
  503. Sets the number of columns \fBdpkg\fP should use when displaying formatted
  504. text. Currently only used by \-l.
  505. .
  506. .SH EXAMPLES
  507. To list packages related to the editor \fBvi\fP(1):
  508. .br
  509. \fB dpkg \-l \(aq*vi*\(aq\fP
  510. .br
  511. To see the entries in \fI/var/lib/dpkg/available\fP of two packages:
  512. .br
  513. \fB dpkg \-\-print\-avail elvis vim | less\fP
  514. .br
  515. To search the listing of packages yourself:
  516. .br
  517. \fB less /var/lib/dpkg/available\fP
  518. .br
  519. To remove an installed elvis package:
  520. .br
  521. \fB dpkg \-r elvis\fP
  522. .br
  523. To install a package, you first need to find it in an archive or
  524. CDROM. The "available" file shows that the vim package is in section
  525. "editors":
  526. .br
  527. \fB cd /cdrom/hamm/hamm/binary/editors\fP
  528. \fB dpkg \-i vim_4.5\-3.deb\fP
  529. .br
  530. To make a local copy of the package selection states:
  531. .br
  532. \fB dpkg \-\-get\-selections >myselections\fP
  533. .br
  534. You might transfer this file to another computer, and install it there
  535. with:
  536. .br
  537. \fB dpkg \-\-clear\-selections\fP
  538. \fB dpkg \-\-set\-selections <myselections\fP
  539. .br
  540. Note that this will not actually install or remove anything, but just
  541. set the selection state on the requested packages. You will need some
  542. other application to actually download and install the requested
  543. packages. For example, run \fBdselect\fP and choose \fIInstall\fP.
  544. Ordinarily, you will find that \fBdselect\fP(1) provides a more
  545. convenient way to modify the package selection states.
  546. .br
  547. .
  548. .SH ADDITIONAL FUNCTIONALITY
  549. Additional functionality can be gained by installing any of the
  550. following packages: \fBapt\fR, \fBaptitude\fR and \fBdebsums\fR.
  551. .
  552. .SH SEE ALSO
  553. \fBdselect\fP(1),
  554. \fBdpkg\-deb\fP(1),
  555. \fBdpkg\-query\fP(1),
  556. \fBdeb\fP(5),
  557. \fBdeb\-control\fP(5),
  558. \fBdpkg.cfg\fP(5),
  559. and
  560. \fBdpkg\-reconfigure\fP(8).
  561. .
  562. .SH BUGS
  563. \fB\-\-no\-act\fP usually gives less information than might be helpful.
  564. .
  565. .SH AUTHORS
  566. See \fI/usr/share/doc/dpkg/THANKS\fP for the list of people who have
  567. contributed to \fBdpkg\fP.