dpkg.1 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. .TH dpkg 1 "2006-04-09" "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. \fBdpkg \-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. \fBdpkg \-\-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. \fBdpkg \-\-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. \fBdpkg \-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. \fBdpkg \-\-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. \fBdpkg \-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 dpkg \-\-forget\-old\-unavail
  170. Forget about uninstalled unavailable packages.
  171. .TP
  172. .B dpkg \-\-clear\-avail
  173. Erase the existing information about what packages are available.
  174. .TP
  175. \fBdpkg \-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. \fBdpkg \-\-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 dpkg \-\-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 dpkg \-\-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 dpkg \-\-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 dpkg \-\-print\-architecture
  201. Print architecture of packages \fBdpkg\fP installs (for example, "i386").
  202. .TP
  203. .B dpkg \-\-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 dpkg \-\-command\-fd <n>
  215. Accept a series of commands on input file descriptor \fB<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 dpkg \-\-help
  220. Display a brief help message.
  221. .TP
  222. .B dpkg \-\-force\-help
  223. Give help about the \fB\-\-force\-\fP\fIthing\fP options.
  224. .TP
  225. .BR "dpkg \-Dh " | " \-\-debug=help"
  226. Give help about debugging options.
  227. .TP
  228. \fBdpkg \-\-licence\fP | \fBdpkg \-\-license\fP
  229. Display \fBdpkg\fP licence.
  230. .TP
  231. \fBdpkg \-\-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. \fBdpkg \-b\fP | \fB\-\-build\fP \fIdirectory\fP [\fIfilename\fP]
  238. Build a deb package.
  239. \fBdpkg \-c\fP | \fB\-\-contents\fP \fIfilename\fP
  240. List contents of a deb package.
  241. \fBdpkg \-e\fP | \fB\-\-control\fP \fIfilename\fP [\fIdirectory\fP]
  242. Extract control-information from a package.
  243. \fBdpkg \-x\fP | \fB\-\-extract\fP \fIfilename directory\fP
  244. Extract the files contained by package.
  245. \fBdpkg \-f\fP | \fB\-\-field\fP \fIfilename\fP [\fIcontrol-field\fP] ...
  246. Display control field(s) of a package.
  247. \fBdpkg \-\-fsys\-tarfile\fP \fIfilename\fP
  248. Display the filesystem tar-file contained by a
  249. Debian package.
  250. \fBdpkg \-I\fP | \fB\-\-info\fP \fIfilename\fP [\fIcontrol-file\fP]
  251. Show information about a package.
  252. \fBdpkg \-X\fP | \fB\-\-vextract\fP \fIfilename\fP \fIdirectory\fP
  253. Extract and display the filenames contained by a
  254. 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. \fBdpkg \-l\fP | \fB\-\-list\fP \fIpackage-name-pattern\fP ...
  261. List packages matching given pattern.
  262. \fBdpkg \-s\fP | \fB\-\-status\fP \fIpackage-name\fP ...
  263. Report status of specified package.
  264. \fBdpkg \-L\fP | \fB\-\-listfiles\fP \fIpackage\fP ...
  265. List files installed to your system from \fBpackage\fP.
  266. \fBdpkg \-S\fP | \fB\-\-search\fP \fIfilename-search-pattern\fP ...
  267. Search for a filename from installed packages.
  268. \fBdpkg \-p\fP | \fB\-\-print\-avail\fP \fIpackage\fP
  269. Display details about \fIpackage\fP, as found in \fI/var/lib/dpkg/available\fP.
  270. .fi
  271. .
  272. .SH OPTIONS
  273. All options can be specified both on the command line and in the \fBdpkg\fP
  274. configuration file \fI/etc/dpkg/dpkg.cfg\fP. Each line in the configuration
  275. file is either an option (exactly the same as the command line option but
  276. without leading dashes) or a comment (if it starts with a \fB#\fR).
  277. .br
  278. .TP
  279. \fB\-\-abort\-after=\fP\fInumber\fP
  280. Change after how many errors \fBdpkg\fP will abort. The default is 50.
  281. .TP
  282. .BR \-B | \-\-auto\-deconfigure
  283. When a package is removed, there is a possibility that another
  284. installed package depended on the removed package. Specifying this
  285. option will cause automatic deconfiguration of the package which
  286. depended on the removed package.
  287. .TP
  288. \fB\-D\fIoctal\fP | \fB\-\-debug=\fP\fIoctal\fP
  289. Switch debugging on. \fIoctal\fP is formed by bitwise-orring desired
  290. values together from the list below (note that these values may change
  291. in future releases). \fB\-Dh\fP or \fB\-\-debug=help\fP display these
  292. debugging values.
  293. number description
  294. 1 Generally helpful progress information
  295. 2 Invocation and status of maintainer scripts
  296. 10 Output for each file processed
  297. 100 Lots of output for each file processed
  298. 20 Output for each configuration file
  299. 200 Lots of output for each configuration file
  300. 40 Dependencies and conflicts
  301. 400 Lots of dependencies/conflicts output
  302. 1000 Lots of drivel about e.g. the dpkg/info dir
  303. 2000 Insane amounts of drivel
  304. .TP
  305. \fB\-\-force\-\fP\fIthings\fP | \fB\-\-no\-force\-\fP\fIthings\fP | \fB\-\-refuse\-\fP\fIthings\fP
  306. Force or refuse (\fBno\-force\fP and \fBrefuse\fP mean the same thing)
  307. to do some things. \fIthings\fP is a comma separated list of things
  308. specified below. \fB\-\-force\-help\fP displays a message describing them.
  309. Things marked with (*) are forced by default.
  310. \fIWarning: These options are mostly intended to be used by experts
  311. only. Using them without fully understanding their effects may break
  312. your whole system.\fP
  313. \fBall\fP:
  314. Turns on (or off) all force options.
  315. \fBdowngrade\fP(*):
  316. Install a package, even if newer version of it is already installed.
  317. \fIWarning: At present dpkg does not do any dependency
  318. checking on downgrades and therefore will not warn you
  319. if the downgrade breaks the dependency of some other
  320. package. This can have serious side effects, downgrading
  321. essential system components can even make your whole
  322. system unusable. Use with care.\fP
  323. \fBconfigure\-any\fP:
  324. Configure also any unpacked but unconfigured packages on which the current
  325. package depends.
  326. \fBhold\fP:
  327. Process packages even when marked "hold".
  328. \fBremove\-reinstreq\fP:
  329. Remove a package, even if it's broken and marked to require
  330. reinstallation. This may, for example, cause parts of the package to
  331. remain on the system, which will then be forgotten by \fBdpkg\fP.
  332. \fBremove\-essential\fP:
  333. Remove, even if the package is considered essential. Essential
  334. packages contain mostly very basic Unix commands. Removing them might
  335. cause the whole system to stop working, so use with caution.
  336. \fBdepends\fP:
  337. Turn all dependency problems into warnings.
  338. \fBdepends\-version\fP:
  339. Don't care about versions when checking dependencies.
  340. \fBconflicts\fP:
  341. Install, even if it conflicts with another package. This is dangerous,
  342. for it will usually cause overwriting of some files.
  343. \fBconfmiss\fP:
  344. Always install a missing configuration file. This is dangerous,
  345. since it means not preserving a change (removing) made to the
  346. file.
  347. \fBconfnew\fP:
  348. If a conffile has been modified always install the new version without
  349. prompting, unless the \fB\-\-force\-confdef\fP is also specified, in
  350. which case the default action is preferred.
  351. \fBconfold\fP:
  352. If a conffile has been modified always keep the old version without
  353. prompting, unless the \fB\-\-force\-confdef\fP is also specified, in
  354. which case the default action is preferred.
  355. \fBconfdef\fP:
  356. If a conffile has been modified always choose the default action. If
  357. there is no default action it will stop to ask the user unless
  358. \fB\-\-force\-confnew\fP or \fB\-\-force\-confold\fP is also been given, in
  359. which case it will use that to decide the final action.
  360. \fBoverwrite\fP:
  361. Overwrite one package's file with another's file.
  362. \fBoverwrite\-dir\fP
  363. Overwrite one package's directory with another's file.
  364. \fBoverwrite\-diverted\fP:
  365. Overwrite a diverted file with an undiverted version.
  366. \fBarchitecture\fP:
  367. Process even packages with the wrong architecture.
  368. \fBbad\-path\fP:
  369. \fBPATH\fP is missing important programs, so problems are likely.
  370. \fBnot\-root\fP:
  371. Try to (de)install things even when not root.
  372. \fBbad\-verify\fP:
  373. Install a package even if it fails authenticity check.
  374. .TP
  375. \fB\-\-ignore\-depends\fP=\fIpackage\fP,...
  376. Ignore dependency-checking for specified packages (actually, checking is
  377. performed, but only warnings about conflicts are given, nothing else).
  378. .TP
  379. \fB\-\-new\fP | \fB\-\-old\fP
  380. Select new or old binary package format. This is a \fBdpkg\-deb\fP(1)
  381. option.
  382. .TP
  383. .B \-\-nocheck
  384. Don't read or check contents of control file while building a package.
  385. This is a \fBdpkg\-deb\fP(1) option.
  386. .TP
  387. \fB\-\-no\-act\fP | \fB\-\-dry\-run\fP | \fB\-\-simulate\fP
  388. Do everything which is supposed to be done, but don't write any
  389. changes. This is used to see what would happen with the specified
  390. action, without actually modifying anything.
  391. Be sure to give \fB\-\-no\-act\fP before the action-parameter, or you might
  392. end up with undesirable results. (e.g. \fBdpkg \-\-purge foo
  393. \-\-no\-act\fP will first purge package foo and then try to purge package
  394. \-\-no\-act, even though you probably expected it to actually do nothing)
  395. .TP
  396. \fB\-R\fP | \fB\-\-recursive\fP
  397. Recursively handle all regular files matching pattern \fB*.deb\fP
  398. found at specified directories and all of its subdirectories. This can
  399. be used with \fB\-i\fP, \fB\-A\fP, \fB\-\-install\fP, \fB\-\-unpack\fP and
  400. \fB\-\-avail\fP actions.
  401. .TP
  402. \fB\-G\fP
  403. Don't install a package if a newer version of the same package is already
  404. installed. This is an alias of \fB\-\-refuse\-downgrade\fP.
  405. .TP
  406. \fB\-\-root=\fP\fIdir\fP | \fB\-\-admindir=\fP\fIdir\fP | \fB\-\-instdir=\fP\fIdir\fP
  407. Change default directories. \fBadmindir\fP defaults to
  408. \fI/var/lib/dpkg\fP and contains many files that give information
  409. about status of installed or uninstalled packages, etc. \fBinstdir\fP
  410. defaults to \fI/\fP and refers to the directory where packages are to
  411. be installed. \fBinstdir\fP is also the directory passed to
  412. \fBchroot\fP(2) before running package's installation scripts, which
  413. means that the scripts see \fBinstdir\fP as a root directory.
  414. Changing \fBroot\fP changes \fBinstdir\fP to \fIdir\fP and
  415. \fBadmindir\fP to \fIdir\fP\fB/var/lib/dpkg\fP.
  416. .TP
  417. \fB\-O\fP | \fB\-\-selected\-only\fP
  418. Only process the packages that are selected for installation. The
  419. actual marking is done with \fBdselect\fP or by \fBdpkg\fP, when it
  420. handles packages. For example, when a package is removed, it will
  421. be marked selected for deinstallation.
  422. .TP
  423. .BR \-E " | " \-\-skip\-same\-version
  424. Don't install the package if the same version of the package is already
  425. installed.
  426. .TP
  427. \fB\-\-status\-fd \fP\fI<n>\fP
  428. Send package status info to file descriptor \fI<n>\fP. This can be given
  429. multiple times. Status updates are of the form `status: <pkg>: <pkg state>'.
  430. Errors are reported as `status: <pkg>: error: extend-error-message'.
  431. Configuration file conflicts are reported as
  432. `status: conffile-prompt: conffile : 'current-conffile' 'new-conffile' useredited distedited'.
  433. .TP
  434. \fB\-\-log=\fP\fIfilename\fP
  435. Log status change updates and actions to \fIfilename\fP, instead of
  436. the default \fI/var/log/dpkg.log\fP. If this option is given multiple
  437. times, the last filename is used. Log messages are of the form
  438. `YYYY-MM-DD HH:MM:SS status
  439. <state> <pkg> <installed-version>' for status change updates;
  440. `YYYY-MM-DD HH:MM:SS <action> <pkg> <installed-version>
  441. <available-version>' for actions where \fI<action>\fP is one of install,
  442. upgrade, remove, purge; and `YYYY-MM-DD HH:MM:SS conffile <filename>
  443. <decision>' for conffile changes where \fI<decision>\fP is either install
  444. or keep.
  445. .TP
  446. \fB\-\-no\-debsig\fP
  447. Do not try to verify package signatures.
  448. .
  449. .SH FILES
  450. .TP
  451. .I /etc/dpkg/dpkg.cfg
  452. Configuration file with default options.
  453. .TP
  454. .I /var/log/dpkg.log
  455. Default log file (see \fI/etc/dpkg/dpkg.cfg\fP(5) and option
  456. \fB\-\-log\fP).
  457. .P
  458. The other files listed below are in their default directories, see option
  459. \fB\-\-admindir\fP to see how to change locations of these files.
  460. .TP
  461. .I /var/lib/dpkg/available
  462. List of available packages.
  463. .TP
  464. .I /var/lib/dpkg/status
  465. Statuses of available packages. This file contains information about
  466. whether a package is marked for removing or not, whether it is
  467. installed or not, etc. See section \fBINFORMATION ABOUT PACKAGES\fP
  468. for more info.
  469. .P
  470. The following files are components of a binary package. See \fBdeb\fP(5)
  471. for more information about them:
  472. .TP
  473. .I control
  474. .TP
  475. .I conffiles
  476. .TP
  477. .I preinst
  478. .TP
  479. .I postinst
  480. .TP
  481. .I prerm
  482. .TP
  483. .I postrm
  484. .
  485. .SH ENVIRONMENT VARIABLES
  486. .TP
  487. .B DPKG_NO_TSTP
  488. Define this to something if you prefer \fBdpkg\fP starting a new
  489. shell rather than suspending itself, while doing a shell escape.
  490. .TP
  491. .B SHELL
  492. The program \fBdpkg\fP will execute when starting a new shell.
  493. .TP
  494. .B COLUMNS
  495. Sets the number of columns \fBdpkg\fP should use when displaying formatted
  496. text. Currently only used by \-l.
  497. .
  498. .SH EXAMPLES
  499. To list packages related to the editor \fBvi\fP(1):
  500. .br
  501. \fB dpkg \-l \(aq*vi*\(aq\fP
  502. .br
  503. To see the entries in \fI/var/lib/dpkg/available\fP of two packages:
  504. .br
  505. \fB dpkg \-\-print\-avail elvis vim | less\fP
  506. .br
  507. To search the listing of packages yourself:
  508. .br
  509. \fB less /var/lib/dpkg/available\fP
  510. .br
  511. To remove an installed elvis package:
  512. .br
  513. \fB dpkg \-r elvis\fP
  514. .br
  515. To install a package, you first need to find it in an archive or
  516. CDROM. The "available" file shows that the vim package is in section
  517. "editors":
  518. .br
  519. \fB cd /cdrom/hamm/hamm/binary/editors\fP
  520. \fB dpkg \-i vim_4.5\-3.deb\fP
  521. .br
  522. To make a local copy of the package selection states:
  523. .br
  524. \fB dpkg \-\-get\-selections >myselections\fP
  525. .br
  526. You might transfer this file to another computer, and install it there
  527. with:
  528. .br
  529. \fB dpkg \-\-clear\-selections\fP
  530. \fB dpkg \-\-set\-selections <myselections\fP
  531. .br
  532. Note that this will not actually install or remove anything, but just
  533. set the selection state on the requested packages. You will need some
  534. other application to actually download and install the requested
  535. packages. For example, run \fBdselect\fP and choose "Install".
  536. Ordinarily, you will find that \fBdselect\fP(1) provides a more
  537. convenient way to modify the package selection states.
  538. .br
  539. .
  540. .SH ADDITIONAL FUNCTIONALITY
  541. Additional functionality can be gained by installing any of the
  542. following packages: \fIapt\fR, \fIaptitude\fR and \fIdebsums\fR.
  543. .
  544. .SH SEE ALSO
  545. \fBdselect\fP(1),
  546. \fBdpkg\-deb\fP(1),
  547. \fBdpkg\-query\fP(1),
  548. \fBdeb\fP(5),
  549. \fBdeb\-control\fP(5),
  550. \fBdpkg.cfg\fP(5),
  551. and
  552. \fBdpkg\-reconfigure\fP(8).
  553. .
  554. .SH BUGS
  555. \fB\-\-no\-act\fP usually gives less information than might be helpful.
  556. .
  557. .SH AUTHORS
  558. .nf
  559. See \fI/usr/share/doc/dpkg/THANKS\fP for the list of people who have
  560. contributed to \fBdpkg\fP.
  561. .fi