dpkg.man 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075
  1. .\" dpkg manual page - dpkg(1)
  2. .\"
  3. .\" Copyright © 1996 Juho Vuori <javuori@cc.helsinki.fi>
  4. .\" Copyright © 1999 Jim Van Zandt <jrv@vanzandt.mv.com>
  5. .\" Copyright © 1999-2003 Wichert Akkerman <wakkerma@debian.org>
  6. .\" Copyright © 2000-2003 Adam Heath <doogie@debian.org>
  7. .\" Copyright © 2002 Josip Rodin
  8. .\" Copyright © 2004-2005 Scott James Remnant <keybuk@debian.org>
  9. .\" Copyright © 2006-2016 Guillem Jover <guillem@debian.org>
  10. .\" Copyright © 2007-2008 Ian Jackson <ijackson@chiark.greenend.org.uk>
  11. .\" Copyright © 2008-2011 Raphaël Hertzog <hertzog@debian.org>
  12. .\"
  13. .\" This is free software; you can redistribute it and/or modify
  14. .\" it under the terms of the GNU General Public License as published by
  15. .\" the Free Software Foundation; either version 2 of the License, or
  16. .\" (at your option) any later version.
  17. .\"
  18. .\" This is distributed in the hope that it will be useful,
  19. .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. .\" GNU General Public License for more details.
  22. .\"
  23. .\" You should have received a copy of the GNU General Public License
  24. .\" along with this program. If not, see <https://www.gnu.org/licenses/>.
  25. .
  26. .TH dpkg 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
  27. .nh
  28. .SH NAME
  29. dpkg \- package manager for Debian
  30. .
  31. .SH SYNOPSIS
  32. .B dpkg
  33. .RI [ option "...] " action
  34. .
  35. .SH WARNING
  36. This manual is intended for users wishing to understand \fBdpkg\fP's
  37. command line options and package states in more detail than that
  38. provided by \fBdpkg \-\-help\fP.
  39. It should \fInot\fP be used by package maintainers wishing to
  40. understand how \fBdpkg\fP will install their packages. The
  41. descriptions of what \fBdpkg\fP does when installing and removing
  42. packages are particularly inadequate.
  43. .
  44. .SH DESCRIPTION
  45. \fBdpkg\fP is a tool to install, build, remove and manage
  46. Debian packages. The primary and more user-friendly
  47. front-end for \fBdpkg\fP is \fBaptitude\fP(1). \fBdpkg\fP itself is
  48. controlled entirely via command line parameters, which consist of exactly
  49. one action and zero or more options. The action-parameter tells \fBdpkg\fP
  50. what to do and options control the behavior of the action in some way.
  51. \fBdpkg\fP can also be used as a front-end to \fBdpkg\-deb\fP(1) and
  52. \fBdpkg\-query\fP(1). The list of supported actions can be found later on
  53. in the \fBACTIONS\fP section. If any such action is encountered \fBdpkg\fP
  54. just runs \fBdpkg\-deb\fP or \fBdpkg\-query\fP with the parameters given
  55. to it, but no specific options are currently passed to them, to use
  56. any such option the back-ends need to be called directly.
  57. .
  58. .SH INFORMATION ABOUT PACKAGES
  59. \fBdpkg\fP maintains some usable information about available
  60. packages. The information is divided in three classes: \fBstates\fP,
  61. \fBselection states\fP and \fBflags\fP. These values are intended to
  62. be changed mainly with \fBdselect\fP.
  63. .SS Package states
  64. .TP
  65. .B not\-installed
  66. The package is not installed on your system.
  67. .TP
  68. .B config\-files
  69. Only the configuration files of the package exist on the system.
  70. .TP
  71. .B half\-installed
  72. The installation of the package has been started, but not completed for
  73. some reason.
  74. .TP
  75. .B unpacked
  76. The package is unpacked, but not configured.
  77. .TP
  78. .B half\-configured
  79. The package is unpacked and configuration has been started, but not yet
  80. completed for some reason.
  81. .TP
  82. .B triggers\-awaited
  83. The package awaits trigger processing by another package.
  84. .TP
  85. .B triggers\-pending
  86. The package has been triggered.
  87. .TP
  88. .B installed
  89. The package is correctly unpacked and configured.
  90. .SS Package selection states
  91. .TP
  92. .B install
  93. The package is selected for installation.
  94. .TP
  95. .B hold
  96. A package marked to be on \fBhold\fP is not handled by \fBdpkg\fP,
  97. unless forced to do that with option \fB\-\-force\-hold\fP.
  98. .TP
  99. .B deinstall
  100. The package is selected for deinstallation (i.e. we want to remove all
  101. files, except configuration files).
  102. .TP
  103. .B purge
  104. The package is selected to be purged (i.e. we want to remove everything
  105. from system directories, even configuration files).
  106. .SS Package flags
  107. .TP
  108. .B ok
  109. A package marked \fBok\fP is in a known state, but might need further
  110. processing.
  111. .TP
  112. .B reinstreq
  113. A package marked \fBreinstreq\fP is broken and requires
  114. reinstallation. These packages cannot be removed, unless forced with
  115. option \fB\-\-force\-remove\-reinstreq\fP.
  116. .
  117. .SH ACTIONS
  118. .TP
  119. \fB\-i\fP, \fB\-\-install\fP \fIpackage-file\fP...
  120. Install the package. If \fB\-\-recursive\fP or \fB\-R\fP option is
  121. specified, \fIpackage-file\fP must refer to a directory instead.
  122. Installation consists of the following steps:
  123. .br
  124. \fB1.\fP Extract the control files of the new package.
  125. .br
  126. \fB2.\fP If another version of the same package was installed before
  127. the new installation, execute \fIprerm\fP script of the old package.
  128. .br
  129. \fB3.\fP Run \fIpreinst\fP script, if provided by the package.
  130. .br
  131. \fB4.\fP Unpack the new files, and at the same time back up the old
  132. files, so that if something goes wrong, they can be restored.
  133. .br
  134. \fB5.\fP If another version of the same package was installed before
  135. the new installation, execute the \fIpostrm\fP script of the old
  136. package. Note that this script is executed after the \fIpreinst\fP
  137. script of the new package, because new files are written at the same
  138. time old files are removed.
  139. .br
  140. \fB6.\fP Configure the package. See \fB\-\-configure\fP for detailed
  141. information about how this is done.
  142. .TP
  143. \fB\-\-unpack \fP\fIpackage-file\fP...
  144. Unpack the package, but don't configure it. If \fB\-\-recursive\fP or
  145. \fB\-R\fP option is specified, \fIpackage-file\fP must refer to a
  146. directory instead.
  147. .TP
  148. \fB\-\-configure \fP\fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  149. Configure a package which has been unpacked but not yet configured.
  150. If \fB\-a\fP or \fB\-\-pending\fP is given instead of \fIpackage\fP,
  151. all unpacked but unconfigured packages are configured.
  152. To reconfigure a package which has already been configured, try the
  153. .BR dpkg\-reconfigure (8)
  154. command instead.
  155. Configuring consists of the following steps:
  156. .br
  157. \fB1.\fP Unpack the conffiles, and at the same time back up
  158. the old conffiles, so that they can be restored if
  159. something goes wrong.
  160. .br
  161. \fB2.\fP Run \fIpostinst\fP script, if provided by the package.
  162. .TP
  163. \fB\-\-triggers\-only\fP \fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  164. Processes only triggers (since dpkg 1.14.17).
  165. All pending triggers will be processed.
  166. If package
  167. names are supplied only those packages' triggers will be processed, exactly
  168. once each where necessary. Use of this option may leave packages in the
  169. improper \fBtriggers\-awaited\fP and \fBtriggers\-pending\fP states. This
  170. can be fixed later by running: \fBdpkg \-\-configure \-\-pending\fP.
  171. .TP
  172. \fB\-r\fP, \fB\-\-remove\fP \fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  173. Remove an installed package. This removes everything except conffiles,
  174. which may avoid having to reconfigure the package if it is reinstalled
  175. later (conffiles are configuration files that are listed in the
  176. \fIDEBIAN/conffiles\fP control file).
  177. If \fB\-a\fP or \fB\-\-pending\fP is given instead of a package name,
  178. then all packages unpacked, but marked to be removed in file
  179. \fI%ADMINDIR%/status\fP, are removed.
  180. Removing of a package consists of the following steps:
  181. .br
  182. \fB1.\fP Run \fIprerm\fP script
  183. .br
  184. \fB2.\fP Remove the installed files
  185. .br
  186. \fB3.\fP Run \fIpostrm\fP script
  187. .br
  188. .TP
  189. \fB\-P\fP, \fB\-\-purge\fP \fIpackage\fP...|\fB\-a\fP|\fB\-\-pending\fP
  190. Purge an installed or already removed package. This removes everything,
  191. including conffiles.
  192. If \fB\-a\fP or \fB\-\-pending\fP is given instead of a package name,
  193. then all packages unpacked or removed, but marked to be purged in file
  194. \fI%ADMINDIR%/status\fP, are purged.
  195. Note: some configuration files might be unknown to \fBdpkg\fP because they
  196. are created and handled separately through the configuration scripts. In
  197. that case, \fBdpkg\fP won't remove them by itself, but the package's
  198. \fIpostrm\fP script (which is called by \fBdpkg\fP), has to take care of
  199. their removal during purge. Of course, this only applies to files in
  200. system directories, not configuration files written to individual users'
  201. home directories.
  202. Purging of a package consists of the following steps:
  203. .br
  204. \fB1.\fP Remove the package, if not already removed. See \fB\-\-remove\fP
  205. for detailed information about how this is done.
  206. .br
  207. \fB2.\fP Run \fIpostrm\fP script.
  208. .br
  209. .TP
  210. .BR \-V ", " \-\-verify " [\fIpackage-name\fP...]
  211. Verifies the integrity of \fIpackage-name\fP or all packages if omitted,
  212. by comparing information from the files installed by a package with the
  213. files metadata information stored in the \fBdpkg\fP database
  214. (since dpkg 1.17.2).
  215. The origin
  216. of the files metadata information in the database is the binary packages
  217. themselves. That metadata gets collected at package unpack time during
  218. the installation process.
  219. Currently the only functional check performed is an md5sum verification
  220. of the file contents against the stored value in the files database.
  221. It will only get checked
  222. if the database contains the file md5sum. To check for any missing
  223. metadata in the database, the \fB\-\-audit\fP command can be used.
  224. The output format is selectable with the \fB\-\-verify\-format\fP
  225. option, which by default uses the \fBrpm\fP format, but that might
  226. change in the future, and as such, programs parsing this command
  227. output should be explicit about the format they expect.
  228. .TP
  229. .BR \-C ", " \-\-audit " [\fIpackage-name\fP...]
  230. Performs database sanity and consistency checks for \fIpackage-name\fP
  231. or all packages if omitted (per package checks since dpkg 1.17.10).
  232. For example, searches for packages that have been installed only partially
  233. on your system or that have missing, wrong or obsolete control data or
  234. files. \fBdpkg\fP will suggest what to do with them to get them fixed.
  235. .TP
  236. .BR \-\-update\-avail " [\fIPackages-file\fP]"
  237. .TQ
  238. .BR \-\-merge\-avail " [\fIPackages-file\fP]"
  239. Update \fBdpkg\fP's and \fBdselect\fP's idea of which packages are
  240. available. With action \fB\-\-merge\-avail\fP, old information is
  241. combined with information from \fIPackages-file\fP. With action
  242. \fB\-\-update\-avail\fP, old information is replaced with the information
  243. in the \fIPackages-file\fP. The \fIPackages-file\fP distributed with
  244. Debian is simply named «\fIPackages\fP». If the \fIPackages-file\fP
  245. argument is missing or named «\fB\-\fP» then it will be read from
  246. standard input (since dpkg 1.17.7). \fBdpkg\fP keeps its record of
  247. available packages in \fI%ADMINDIR%/available\fP.
  248. A simpler one-shot command to retrieve and update the \fIavailable\fR
  249. file is \fBdselect update\fR. Note that this file is mostly useless
  250. if you don't use \fBdselect\fR but an APT-based frontend: APT has its
  251. own system to keep track of available packages.
  252. .TP
  253. \fB\-A\fP, \fB\-\-record\-avail\fP \fIpackage-file\fP...
  254. Update \fBdpkg\fP and \fBdselect\fP's idea of which packages are
  255. available with information from the package \fIpackage-file\fP. If
  256. \fB\-\-recursive\fP or \fB\-R\fP option is specified, \fIpackage-file\fP
  257. must refer to a directory instead.
  258. .TP
  259. .B \-\-forget\-old\-unavail
  260. Now \fBobsolete\fP and a no-op as \fBdpkg\fP will automatically forget
  261. uninstalled unavailable packages (since dpkg 1.15.4), but only those that
  262. do not contain user information such as package selections.
  263. .TP
  264. .B \-\-clear\-avail
  265. Erase the existing information about what packages are available.
  266. .TP
  267. \fB\-\-get\-selections\fP [\fIpackage-name-pattern\fP...]
  268. Get list of package selections, and write it to stdout. Without a pattern,
  269. non-installed packages (i.e. those which have been previously purged) will
  270. not be shown.
  271. .TP
  272. .B \-\-set\-selections
  273. Set package selections using file read from stdin. This file should be
  274. in the format “\fIpackage\fP \fIstate\fP”, where state is one of
  275. \fBinstall\fP, \fBhold\fP, \fBdeinstall\fP or \fBpurge\fP. Blank lines
  276. and comment lines beginning with ‘\fB#\fP’ are also permitted.
  277. The \fIavailable\fP file needs to be up-to-date for this command to be
  278. useful, otherwise unknown packages will be ignored with a warning. See
  279. the \fB\-\-update\-avail\fP and \fB\-\-merge\-avail\fP commands for more
  280. information.
  281. .TP
  282. .B \-\-clear\-selections
  283. Set the requested state of every non-essential package to deinstall
  284. (since dpkg 1.13.18).
  285. This is intended to be used immediately before \fB\-\-set\-selections\fP,
  286. to deinstall any packages not in list given to \fB\-\-set\-selections\fP.
  287. .TP
  288. .B \-\-yet\-to\-unpack
  289. Searches for packages selected for installation, but which for some
  290. reason still haven't been installed.
  291. .TP
  292. .B \-\-predep\-package
  293. Print a single package which is the target of one or more relevant
  294. pre-dependencies and has itself no unsatisfied pre-dependencies.
  295. .IP
  296. If such a package is present, output it as a Packages file entry,
  297. which can be massaged as appropriate.
  298. .IP
  299. Returns 0 when a package is printed, 1 when no suitable package is
  300. available and 2 on error.
  301. .TP
  302. .B \-\-add\-architecture \fIarchitecture\fP
  303. Add \fIarchitecture\fP to the list of architectures for which packages can
  304. be installed without using \fB\-\-force\-architecture\fP (since dpkg 1.16.2).
  305. The architecture
  306. \fBdpkg\fP is built for (i.e. the output of \fB\-\-print\-architecture\fP)
  307. is always part of that list.
  308. .TP
  309. .B \-\-remove\-architecture \fIarchitecture\fP
  310. Remove \fIarchitecture\fP from the list of architectures for which packages
  311. can be installed without using \fB\-\-force\-architecture\fP
  312. (since dpkg 1.16.2). If the
  313. architecture is currently in use in the database then the operation will
  314. be refused, except if \fB\-\-force\-architecture\fP is specified. The
  315. architecture \fBdpkg\fP is built for (i.e. the output of
  316. \fB\-\-print\-architecture\fP) can never be removed from that list.
  317. .TP
  318. .B \-\-print\-architecture
  319. Print architecture of packages \fBdpkg\fP installs (for example, “i386”).
  320. .TP
  321. .B \-\-print\-foreign\-architectures
  322. Print a newline-separated list of the extra architectures \fBdpkg\fP is
  323. configured to allow packages to be installed for (since dpkg 1.16.2).
  324. .TP
  325. .BI \-\-assert\- feature
  326. Asserts that \fBdpkg\fP supports the requested feature.
  327. Returns 0 if the feature is fully supported, 1 if the feature is known but
  328. \fBdpkg\fP cannot provide support for it yet, and 2 if the feature is unknown.
  329. The current list of assertable features is:
  330. .RS
  331. .TP
  332. .B support\-predepends
  333. Supports the \fBPre\-Depends\fP field (since dpkg 1.1.0).
  334. .TP
  335. .B working\-epoch
  336. Supports epochs in version strings (since dpkg 1.4.0.7).
  337. .TP
  338. .B long\-filenames
  339. Supports long filenames in \fBdeb\fP(5) archives (since dpkg 1.4.1.17).
  340. .TP
  341. .B multi\-conrep
  342. Supports multiple \fBConflicts\fP and \fBReplaces\fP (since dpkg 1.4.1.19).
  343. .TP
  344. .B multi\-arch
  345. Supports multi-arch fields and semantics (since dpkg 1.16.2).
  346. .TP
  347. .B versioned\-provides
  348. Supports versioned \fBProvides\fP (since dpkg 1.17.11).
  349. .RE
  350. .TP
  351. .BI \-\-validate\- "thing string"
  352. Validate that the \fIthing\fP \fIstring\fP has a correct syntax
  353. (since dpkg 1.18.16).
  354. Returns 0 if the \fIstring\fP is valid, 1 if the \fIstring\fP is invalid but
  355. might be accepted in lax contexts, and 2 if the \fIstring\fP is invalid.
  356. The current list of validatable \fIthing\fPs is:
  357. .RS
  358. .TP
  359. .B pkgname
  360. Validates the given package name (since dpkg 1.18.16).
  361. .TP
  362. .B trigname
  363. Validates the given trigger name (since dpkg 1.18.16).
  364. .TP
  365. .B pkgname
  366. Validates the given architecture name (since dpkg 1.18.16).
  367. .TP
  368. .B version
  369. Validates the given version (since dpkg 1.18.16).
  370. .RE
  371. .TP
  372. .B \-\-compare\-versions \fIver1 op ver2\fP
  373. Compare version numbers, where \fIop\fP is a binary operator. \fBdpkg\fP
  374. returns true (\fB0\fP) if the specified condition is satisfied,
  375. and false (\fB1\fP) otherwise. There are
  376. two groups of operators, which differ in how they treat an empty
  377. \fIver1\fP or \fIver2\fP. These treat an empty version as earlier than any
  378. version: \fBlt le eq ne ge gt\fP. These treat an empty version as later
  379. than any version: \fBlt\-nl le\-nl ge\-nl gt\-nl\fP. These are provided
  380. only for compatibility with control file syntax: \fB< << <= = >= >>
  381. >\fP. The \fB<\fP and \fB>\fP operators are obsolete and should \fBnot\fP
  382. be used, due to confusing semantics. To illustrate: \fB0.1 < 0.1\fP
  383. evaluates to true.
  384. .\" .TP
  385. .\" .B \-\-command\-fd \fIn\fP
  386. .\" Accept a series of commands on input file descriptor \fIn\fP. Note:
  387. .\" additional options set on the command line, and through this file descriptor,
  388. .\" are not reset for subsequent commands executed during the same run.
  389. .TP
  390. .BR \-? ", " \-\-help
  391. Display a brief help message.
  392. .TP
  393. .B \-\-force\-help
  394. Give help about the \fB\-\-force\-\fP\fIthing\fP options.
  395. .TP
  396. .BR \-Dh ", " \-\-debug=help
  397. Give help about debugging options.
  398. .TP
  399. \fB\-\-version\fP
  400. Display \fBdpkg\fP version information.
  401. .TP
  402. \fBdpkg\-deb actions\fP
  403. See \fBdpkg\-deb\fP(1) for more information about the following actions.
  404. .nf
  405. \fB\-b\fP, \fB\-\-build\fP \fIdirectory\fP [\fIarchive\fP|\fIdirectory\fP]
  406. Build a deb package.
  407. \fB\-c\fP, \fB\-\-contents\fP \fIarchive\fP
  408. List contents of a deb package.
  409. \fB\-e\fP, \fB\-\-control\fP \fIarchive\fP [\fIdirectory\fP]
  410. Extract control-information from a package.
  411. \fB\-x\fP, \fB\-\-extract\fP \fIarchive directory\fP
  412. Extract the files contained by package.
  413. \fB\-X\fP, \fB\-\-vextract\fP \fIarchive directory\fP
  414. Extract and display the filenames contained by a
  415. package.
  416. \fB\-f\fP, \fB\-\-field\fP \fIarchive\fP [\fIcontrol-field\fP...]
  417. Display control field(s) of a package.
  418. .BR \-\-ctrl\-tarfile " \fIarchive\fP"
  419. Output the control tar-file contained in a Debian package.
  420. \fB\-\-fsys\-tarfile\fP \fIarchive\fP
  421. Output the filesystem tar-file contained by a Debian package.
  422. \fB\-I\fP, \fB\-\-info\fP \fIarchive\fP [\fIcontrol-file\fP...]
  423. Show information about a package.
  424. .fi
  425. .TP
  426. \fBdpkg\-query actions\fP
  427. See \fBdpkg\-query\fP(1) for more information about the following actions.
  428. .nf
  429. \fB\-l\fP, \fB\-\-list\fP \fIpackage-name-pattern\fP...
  430. List packages matching given pattern.
  431. \fB\-s\fP, \fB\-\-status\fP \fIpackage-name\fP...
  432. Report status of specified package.
  433. \fB\-L\fP, \fB\-\-listfiles\fP \fIpackage-name\fP...
  434. List files installed to your system from \fIpackage-name\fP.
  435. \fB\-S\fP, \fB\-\-search\fP \fIfilename-search-pattern\fP...
  436. Search for a filename from installed packages.
  437. \fB\-p\fP, \fB\-\-print\-avail\fP \fIpackage-name\fP...
  438. Display details about \fIpackage-name\fP, as found in
  439. \fI%ADMINDIR%/available\fP. Users of APT-based frontends
  440. should use \fBapt\-cache show\fP \fIpackage-name\fP instead.
  441. .fi
  442. .
  443. .SH OPTIONS
  444. All options can be specified both on the command line and in the \fBdpkg\fP
  445. configuration file \fI%PKGCONFDIR%/dpkg.cfg\fP or fragment files (with names
  446. matching this shell pattern '[0-9a-zA-Z_-]*') on the configuration
  447. directory \fI%PKGCONFDIR%/dpkg.cfg.d/\fP. Each line in the configuration
  448. file is either an option (exactly the same as the command line option but
  449. without leading hyphens) or a comment (if it starts with a ‘\fB#\fP’).
  450. .br
  451. .TP
  452. \fB\-\-abort\-after=\fP\fInumber\fP
  453. Change after how many errors \fBdpkg\fP will abort. The default is 50.
  454. .TP
  455. .BR \-B ", " \-\-auto\-deconfigure
  456. When a package is removed, there is a possibility that another
  457. installed package depended on the removed package. Specifying this
  458. option will cause automatic deconfiguration of the package which
  459. depended on the removed package.
  460. .TP
  461. \fB\-D\fIoctal\fP, \fB\-\-debug=\fP\fIoctal\fP
  462. Switch debugging on. \fIoctal\fP is formed by bitwise-orring desired
  463. values together from the list below (note that these values may change
  464. in future releases). \fB\-Dh\fP or \fB\-\-debug=help\fP display these
  465. debugging values.
  466. Number Description
  467. 1 Generally helpful progress information
  468. 2 Invocation and status of maintainer scripts
  469. 10 Output for each file processed
  470. 100 Lots of output for each file processed
  471. 20 Output for each configuration file
  472. 200 Lots of output for each configuration file
  473. 40 Dependencies and conflicts
  474. 400 Lots of dependencies/conflicts output
  475. 10000 Trigger activation and processing
  476. 20000 Lots of output regarding triggers
  477. 40000 Silly amounts of output regarding triggers
  478. 1000 Lots of drivel about e.g. the dpkg/info dir
  479. 2000 Insane amounts of drivel
  480. .TP
  481. .B \-\-force\-\fIthings\fP
  482. .TQ
  483. .BR \-\-no\-force\-\fIthings\fP ", " \-\-refuse\-\fIthings\fP
  484. Force or refuse (\fBno\-force\fP and \fBrefuse\fP mean the same thing)
  485. to do some things. \fIthings\fP is a comma separated list of things
  486. specified below. \fB\-\-force\-help\fP displays a message describing them.
  487. Things marked with (*) are forced by default.
  488. \fIWarning: These options are mostly intended to be used by experts
  489. only. Using them without fully understanding their effects may break
  490. your whole system.\fP
  491. \fBall\fP:
  492. Turns on (or off) all force options.
  493. \fBdowngrade\fP(*):
  494. Install a package, even if newer version of it is already installed.
  495. \fIWarning: At present \fP\fBdpkg\fP\fI does not do any dependency
  496. checking on downgrades and therefore will not warn you
  497. if the downgrade breaks the dependency of some other
  498. package. This can have serious side effects, downgrading
  499. essential system components can even make your whole
  500. system unusable. Use with care.\fP
  501. \fBconfigure\-any\fP:
  502. Configure also any unpacked but unconfigured packages on which the current
  503. package depends.
  504. \fBhold\fP:
  505. Process packages even when marked “hold”.
  506. \fBremove\-reinstreq\fP:
  507. Remove a package, even if it's broken and marked to require
  508. reinstallation. This may, for example, cause parts of the package to
  509. remain on the system, which will then be forgotten by \fBdpkg\fP.
  510. \fBremove\-essential\fP:
  511. Remove, even if the package is considered essential. Essential
  512. packages contain mostly very basic Unix commands. Removing them might
  513. cause the whole system to stop working, so use with caution.
  514. \fBdepends\fP:
  515. Turn all dependency problems into warnings.
  516. \fBdepends\-version\fP:
  517. Don't care about versions when checking dependencies.
  518. \fBbreaks\fP:
  519. Install, even if this would break another package (since dpkg 1.14.6).
  520. \fBconflicts\fP:
  521. Install, even if it conflicts with another package. This is dangerous,
  522. for it will usually cause overwriting of some files.
  523. \fBconfmiss\fP:
  524. Always install the missing conffile without prompting. This is dangerous,
  525. since it means not preserving a change (removing) made to the file.
  526. \fBconfnew\fP:
  527. If a conffile has been modified and the version in the package did change,
  528. always install the new version without prompting, unless the
  529. \fB\-\-force\-confdef\fP is also specified, in which case the default
  530. action is preferred.
  531. \fBconfold\fP:
  532. If a conffile has been modified and the version in the package did change,
  533. always keep the old version without prompting, unless the
  534. \fB\-\-force\-confdef\fP is also specified, in which case the default
  535. action is preferred.
  536. \fBconfdef\fP:
  537. If a conffile has been modified and the version in the package did change,
  538. always choose the default action without prompting. If there is no default
  539. action it will stop to ask the user unless \fB\-\-force\-confnew\fP or
  540. \fB\-\-force\-confold\fP is also been given, in which case it will use
  541. that to decide the final action.
  542. \fBconfask\fP:
  543. If a conffile has been modified always offer to replace it with the
  544. version in the package, even if the version in the package did not
  545. change (since dpkg 1.15.8).
  546. If any of \fB\-\-force\-confnew\fP,
  547. \fB\-\-force\-confold\fP, or \fB\-\-force\-confdef\fP is also given,
  548. it will be used to decide the final action.
  549. \fBoverwrite\fP:
  550. Overwrite one package's file with another's file.
  551. \fBoverwrite\-dir\fP:
  552. Overwrite one package's directory with another's file.
  553. \fBoverwrite\-diverted\fP:
  554. Overwrite a diverted file with an undiverted version.
  555. \fBunsafe\-io\fP:
  556. Do not perform safe I/O operations when unpacking (since dpkg 1.15.8.6).
  557. Currently this
  558. implies not performing file system syncs before file renames, which is
  559. known to cause substantial performance degradation on some file systems,
  560. unfortunately the ones that require the safe I/O on the first place due
  561. to their unreliable behaviour causing zero-length files on abrupt
  562. system crashes.
  563. \fINote\fP: For ext4, the main offender, consider using instead the
  564. mount option \fBnodelalloc\fP, which will fix both the performance
  565. degradation and the data safety issues, the latter by making the file
  566. system not produce zero-length files on abrupt system crashes with
  567. any software not doing syncs before atomic renames.
  568. \fIWarning: Using this option might improve performance at the cost of
  569. losing data, use with care.\fP
  570. \fBscript-chrootless\fP:
  571. Run maintainer scrips without \fBchroot\fP(2)ing into \fBinstdir\fP even
  572. if the package does not support this mode of operation (since dpkg 1.18.5).
  573. \fIWarning: This can destroy your host system, use with extreme care.\fP
  574. \fBarchitecture\fP:
  575. Process even packages with wrong or no architecture.
  576. \fBbad\-version\fP:
  577. Process even packages with wrong versions (since dpkg 1.16.1).
  578. \fBbad\-path\fP:
  579. \fBPATH\fP is missing important programs, so problems are likely.
  580. \fBnot\-root\fP:
  581. Try to (de)install things even when not root.
  582. \fBbad\-verify\fP:
  583. Install a package even if it fails authenticity check.
  584. .TP
  585. \fB\-\-ignore\-depends\fP=\fIpackage\fP,...
  586. Ignore dependency-checking for specified packages (actually, checking is
  587. performed, but only warnings about conflicts are given, nothing else).
  588. .TP
  589. \fB\-\-no\-act\fP, \fB\-\-dry\-run\fP, \fB\-\-simulate\fP
  590. Do everything which is supposed to be done, but don't write any
  591. changes. This is used to see what would happen with the specified
  592. action, without actually modifying anything.
  593. Be sure to give \fB\-\-no\-act\fP before the action-parameter, or you might
  594. end up with undesirable results. (e.g. \fBdpkg \-\-purge foo
  595. \-\-no\-act\fP will first purge package foo and then try to purge package
  596. \-\-no\-act, even though you probably expected it to actually do nothing)
  597. .TP
  598. \fB\-R\fP, \fB\-\-recursive\fP
  599. Recursively handle all regular files matching pattern \fB*.deb\fP
  600. found at specified directories and all of its subdirectories. This can
  601. be used with \fB\-i\fP, \fB\-A\fP, \fB\-\-install\fP, \fB\-\-unpack\fP and
  602. \fB\-\-record\-avail\fP actions.
  603. .TP
  604. \fB\-G\fP
  605. Don't install a package if a newer version of the same package is already
  606. installed. This is an alias of \fB\-\-refuse\-downgrade\fP.
  607. .TP
  608. .BI \-\-admindir= dir
  609. Change default administrative directory, which contains many files that
  610. give information about status of installed or uninstalled packages, etc.
  611. (Defaults to «\fI%ADMINDIR%\fP»)
  612. .TP
  613. .BI \-\-instdir= dir
  614. Change default installation directory which refers to the directory where
  615. packages are to be installed. \fBinstdir\fP is also the directory passed
  616. to \fBchroot\fP(2) before running package's installation scripts, which
  617. means that the scripts see \fBinstdir\fP as a root directory.
  618. (Defaults to «\fI/\fP»)
  619. .TP
  620. .BI \-\-root= dir
  621. Changing \fBroot\fP changes \fBinstdir\fP to «\fIdir\fP» and
  622. \fBadmindir\fP to «\fIdir\fP\fB%ADMINDIR%\fP».
  623. .TP
  624. \fB\-O\fP, \fB\-\-selected\-only\fP
  625. Only process the packages that are selected for installation. The
  626. actual marking is done with \fBdselect\fP or by \fBdpkg\fP, when it
  627. handles packages. For example, when a package is removed, it will
  628. be marked selected for deinstallation.
  629. .TP
  630. .BR \-E ", " \-\-skip\-same\-version
  631. Don't install the package if the same version of the package is already
  632. installed.
  633. .TP
  634. .BI \-\-pre\-invoke= command
  635. .TQ
  636. .BI \-\-post\-invoke= command
  637. Set an invoke hook \fIcommand\fP to be run via \*(lqsh \-c\*(rq before or
  638. after the \fBdpkg\fP run for the \fIunpack\fP, \fIconfigure\fP, \fIinstall\fP,
  639. \fItriggers\-only\fP, \fIremove\fP, \fIpurge\fP, \fIadd\-architecture\fP and
  640. \fIremove\-architecture\fP \fBdpkg\fP actions (since dpkg 1.15.4;
  641. \fIadd\-architecture\fP and \fIremove\-architecture\fP actions
  642. since dpkg 1.17.19). This
  643. option can be specified multiple times. The order the options are specified
  644. is preserved, with the ones from the configuration files taking precedence.
  645. The environment variable \fBDPKG_HOOK_ACTION\fP is set for the hooks to the
  646. current \fBdpkg\fP action. Note: front-ends might call \fBdpkg\fP several
  647. times per invocation, which might run the hooks more times than expected.
  648. .TP
  649. .BI \-\-path\-exclude= glob-pattern
  650. .TQ
  651. .BI \-\-path\-include= glob-pattern
  652. Set \fIglob-pattern\fP as a path filter, either by excluding or re-including
  653. previously excluded paths matching the specified patterns during install
  654. (since dpkg 1.15.8).
  655. \fIWarning: take into account that depending on the excluded paths you
  656. might completely break your system, use with caution.\fP
  657. The glob patterns use the same wildcards used in the shell, were
  658. ‘*’ matches any sequence of characters, including the empty string
  659. and also ‘/’.
  660. For example, «\fI/usr/*/READ*\fP» matches
  661. «\fI/usr/share/doc/package/README\fP».
  662. As usual, ‘?’ matches any single character (again, including ‘/’).
  663. And ‘[’
  664. starts a character class, which can contain a list of characters, ranges
  665. and complementations. See \fBglob\fP(7) for detailed information about
  666. globbing. Note: the current implementation might re-include more directories
  667. and symlinks than needed, to be on the safe side and avoid possible unpack
  668. failures; future work might fix this.
  669. This can be used to remove all paths except some particular ones; a typical
  670. case is:
  671. .nf
  672. .B \-\-path\-exclude=/usr/share/doc/*
  673. .B \-\-path\-include=/usr/share/doc/*/copyright
  674. .fi
  675. to remove all documentation files except the copyright files.
  676. These two options can be specified multiple times, and interleaved with
  677. each other. Both are processed in the given order, with the last rule that
  678. matches a file name making the decision.
  679. The filters are applied when unpacking the binary packages, and as such
  680. only have knowledge of the type of object currently being filtered
  681. (e.g. a normal file or a directory) and have not visibility of what
  682. objects will come next.
  683. Because these filters have side effects (in contrast to \fBfind\fP(1)
  684. filters), excluding an exact pathname that happens to be a directory object
  685. like \fI/usr/share/doc\fP will not have the desired result, and only that
  686. pathname will be excluded (which could be automatically reincluded if the
  687. code sees the need).
  688. Any subsequent files contained within that directory will fail to unpack.
  689. Hint: make sure the globs are not expanded by your shell.
  690. .TP
  691. .BI \-\-verify\-format " format-name"
  692. Sets the output format for the \fB\-\-verify\fP command (since dpkg 1.17.2).
  693. The only currently supported output format is \fBrpm\fP, which consists
  694. of a line for every path that failed any check.
  695. The lines start with 9 characters to report each specific check result,
  696. a ‘\fB?\fP’ implies the check could not be done (lack of support,
  697. file permissions, etc), ‘\fB.\fP’ implies the check passed, and
  698. an alphanumeric character implies a specific check failed; the md5sum
  699. verification failure (the file contents have changed) is denoted with
  700. a ‘\fB5\fP’ on the third character.
  701. The line is followed by a space and an attribute character (currently
  702. ‘\fBc\fP’ for conffiles), another space and the pathname.
  703. .TP
  704. \fB\-\-status\-fd \fR\fIn\fR
  705. Send machine-readable package status and progress information to file
  706. descriptor \fIn\fP. This option can be specified multiple times. The
  707. information is generally one record per line, in one of the following
  708. forms:
  709. .RS
  710. .TP
  711. .BI "status: " package ": " status
  712. Package status changed; \fIstatus\fR is as in the status file.
  713. .TP
  714. .BI "status: " package " : error : " extended-error-message
  715. An error occurred. Any possible newlines in \fIextended-error-message\fR
  716. will be converted to spaces before output.
  717. .TP
  718. .BI "status: " file " : conffile\-prompt : '" real-old "' '" real-new "' " useredited " " distedited
  719. User is being asked a conffile question.
  720. .TP
  721. .BI "processing: " stage ": " package
  722. Sent just before a processing stage starts. \fIstage\fR is one of
  723. .BR upgrade ", " install " (both sent before unpacking),"
  724. .BR configure ", " trigproc ", " disappear ", " remove ", " purge .
  725. .RE
  726. .TP
  727. \fB\-\-status\-logger\fR=\fIcommand\fR
  728. Send machine-readable package status and progress information to the
  729. shell \fIcommand\fR's standard input, to be run via \*(lqsh \-c\*(rq
  730. (since dpkg 1.16.0).
  731. This option can be specified multiple times.
  732. The output format used is the same as in \fB\-\-status\-fd\fP.
  733. .TP
  734. \fB\-\-log=\fP\fIfilename\fP
  735. Log status change updates and actions to \fIfilename\fP, instead of
  736. the default \fI%LOGDIR%/dpkg.log\fP. If this option is given multiple
  737. times, the last filename is used. Log messages are of the form:
  738. .RS
  739. .TP
  740. YYYY-MM-DD HH:MM:SS \fBstartup\fP \fItype\fP \fIcommand\fP
  741. For each dpkg invocation where \fItype\fP is \fBarchives\fP (with a
  742. \fIcommand\fP of \fBunpack\fP or \fBinstall\fP) or \fBpackages\fP
  743. (with a \fIcommand\fP of \fBconfigure\fP, \fBtriggers\-only\fP,
  744. \fBremove\fP or \fBpurge\fP).
  745. .TP
  746. YYYY-MM-DD HH:MM:SS \fBstatus\fP \fIstate\fP \fIpkg\fP \fIinstalled-version\fP
  747. For status change updates.
  748. .TP
  749. YYYY-MM-DD HH:MM:SS \fIaction\fP \fIpkg\fP \fIinstalled-version\fP \fIavailable-version\fP
  750. For actions where \fIaction\fP is one of \fBinstall\fP, \fBupgrade\fP,
  751. \fBconfigure\fP, \fBtrigproc\fP, \fBdisappear\fP, \fBremove\fP or \fBpurge\fP.
  752. .TP
  753. YYYY-MM-DD HH:MM:SS \fBconffile\fP \fIfilename\fP \fIdecision\fP
  754. For conffile changes where \fIdecision\fP is either \fBinstall\fP or
  755. \fBkeep\fP.
  756. .RE
  757. .TP
  758. \fB\-\-no\-debsig\fP
  759. Do not try to verify package signatures.
  760. .TP
  761. \fB\-\-no\-triggers\fP
  762. Do not run any triggers in this run (since dpkg 1.14.17), but activations
  763. will still be recorded.
  764. If used with \fB\-\-configure\fP \fIpackage\fP or
  765. \fB\-\-triggers\-only\fP \fIpackage\fP then the named package postinst
  766. will still be run even if only a triggers run is needed. Use of this option
  767. may leave packages in the improper \fBtriggers\-awaited\fP and
  768. \fBtriggers\-pending\fP states. This can be fixed later by running:
  769. \fBdpkg \-\-configure \-\-pending\fP.
  770. .TP
  771. \fB\-\-triggers\fP
  772. Cancels a previous \fB\-\-no\-triggers\fP (since dpkg 1.14.17).
  773. .
  774. .SH EXIT STATUS
  775. .TP
  776. .B 0
  777. The requested action was successfully performed.
  778. Or a check or assertion command returned true.
  779. .TP
  780. .B 1
  781. A check or assertion command returned false.
  782. .TP
  783. .B 2
  784. Fatal or unrecoverable error due to invalid command-line usage, or
  785. interactions with the system, such as accesses to the database,
  786. memory allocations, etc.
  787. .
  788. .SH ENVIRONMENT
  789. .SS External environment
  790. .TP
  791. .B PATH
  792. This variable is expected to be defined in the environment and point to
  793. the system paths where several required programs are to be found. If it's
  794. not set or the programs are not found, \fBdpkg\fP will abort.
  795. .TP
  796. .B HOME
  797. If set, \fBdpkg\fP will use it as the directory from which to read the user
  798. specific configuration file.
  799. .TP
  800. .B TMPDIR
  801. If set, \fBdpkg\fP will use it as the directory in which to create
  802. temporary files and directories.
  803. .TP
  804. .B PAGER
  805. The program \fBdpkg\fP will execute when displaying the conffiles.
  806. .TP
  807. .B SHELL
  808. The program \fBdpkg\fP will execute when starting a new interactive shell.
  809. .TP
  810. .B COLUMNS
  811. Sets the number of columns \fBdpkg\fP should use when displaying formatted
  812. text.
  813. Currently only used by \fB\-\-list\fP.
  814. .TP
  815. .B DPKG_COLORS
  816. Sets the color mode (since dpkg 1.18.5).
  817. The currently accepted values are: \fBauto\fP (default), \fBalways\fP and
  818. \fBnever\fP.
  819. .SS Internal environment
  820. .TP
  821. .B DPKG_ROOT
  822. Defined by \fBdpkg\fP on the maintainer script environment to indicate
  823. which installation to act on (since dpkg 1.18.5).
  824. The value is intended to be prepended to any path maintainer scripts
  825. operate on.
  826. During normal operation, this variable is empty.
  827. When installing packages into a different \fBinstdir\fP, \fBdpkg\fP
  828. normally invokes maintainer scripts using \fBchroot\fP(2) and leaves
  829. this variable empty, but if \fB\-\-force\-script\-chrootless\fP is
  830. specified then the \fBchroot\fP(2) call is skipped and \fBinstdir\fP
  831. is non-empty.
  832. .TP
  833. .B DPKG_ADMINDIR
  834. Defined by \fBdpkg\fP on the maintainer script environment to indicate
  835. the \fBdpkg\fP administrative directory to use (since dpkg 1.16.0).
  836. This variable is always set to the current \fB\-\-admindir\fP value.
  837. .TP
  838. .B DPKG_SHELL_REASON
  839. Defined by \fBdpkg\fP on the shell spawned on the conffile prompt to
  840. examine the situation (since dpkg 1.15.6).
  841. Current valid value: \fBconffile\-prompt\fP.
  842. .TP
  843. .B DPKG_CONFFILE_OLD
  844. Defined by \fBdpkg\fP on the shell spawned on the conffile prompt to
  845. examine the situation (since dpkg 1.15.6).
  846. Contains the path to the old conffile.
  847. .TP
  848. .B DPKG_CONFFILE_NEW
  849. Defined by \fBdpkg\fP on the shell spawned on the conffile prompt to
  850. examine the situation (since dpkg 1.15.6).
  851. Contains the path to the new conffile.
  852. .TP
  853. .B DPKG_HOOK_ACTION
  854. Defined by \fBdpkg\fP on the shell spawned when executing a hook action
  855. (since dpkg 1.15.4).
  856. Contains the current \fBdpkg\fP action.
  857. .TP
  858. .B DPKG_RUNNING_VERSION
  859. Defined by \fBdpkg\fP on the maintainer script environment to the
  860. version of the currently running \fBdpkg\fP instance (since dpkg 1.14.17).
  861. .TP
  862. .B DPKG_MAINTSCRIPT_PACKAGE
  863. Defined by \fBdpkg\fP on the maintainer script environment to the
  864. (non-arch-qualified) package name being handled (since dpkg 1.14.17).
  865. .TP
  866. .B DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT
  867. Defined by \fBdpkg\fP on the maintainer script environment to the
  868. package reference count, i.e. the number of package instances with
  869. a state greater than \fBnot\-installed\fP (since dpkg 1.17.2).
  870. .TP
  871. .B DPKG_MAINTSCRIPT_ARCH
  872. Defined by \fBdpkg\fP on the maintainer script environment to the
  873. architecture the package got built for (since dpkg 1.15.4).
  874. .TP
  875. .B DPKG_MAINTSCRIPT_NAME
  876. Defined by \fBdpkg\fP on the maintainer script environment to the
  877. name of the script running, one of \fBpreinst\fP, \fBpostinst\fP,
  878. \fBprerm\fP or \fBpostrm\fP (since dpkg 1.15.7).
  879. .TP
  880. .B DPKG_MAINTSCRIPT_DEBUG
  881. Defined by \fBdpkg\fP on the maintainer script environment to a value
  882. (‘\fB0\fP’ or ‘\fB1\fP’) noting whether debugging has been
  883. requested (with the \fB\-\-debug\fP option) for the maintainer scripts
  884. (since dpkg 1.18.4).
  885. .
  886. .SH FILES
  887. .TP
  888. .I %PKGCONFDIR%/dpkg.cfg.d/[0-9a-zA-Z_-]*
  889. Configuration fragment files (since dpkg 1.15.4).
  890. .TP
  891. .I %PKGCONFDIR%/dpkg.cfg
  892. Configuration file with default options.
  893. .TP
  894. .I %LOGDIR%/dpkg.log
  895. Default log file (see \fI%PKGCONFDIR%/dpkg.cfg\fP and option
  896. \fB\-\-log\fP).
  897. .P
  898. The other files listed below are in their default directories, see option
  899. \fB\-\-admindir\fP to see how to change locations of these files.
  900. .TP
  901. .I %ADMINDIR%/available
  902. List of available packages.
  903. .TP
  904. .I %ADMINDIR%/status
  905. Statuses of available packages. This file contains information about
  906. whether a package is marked for removing or not, whether it is
  907. installed or not, etc. See section \fBINFORMATION ABOUT PACKAGES\fP
  908. for more info.
  909. The status file is backed up daily in \fI/var/backups\fP. It can be
  910. useful if it's lost or corrupted due to filesystems troubles.
  911. .P
  912. The format and contents of a binary package are described in \fBdeb\fP(5).
  913. .
  914. .SH BUGS
  915. \fB\-\-no\-act\fP usually gives less information than might be helpful.
  916. .
  917. .SH EXAMPLES
  918. To list installed packages related to the editor \fBvi\fP(1) (note that
  919. \fBdpkg\-query\fP does not load the \fIavailable\fP file anymore by
  920. default, and the \fBdpkg\-query\fP \fB\-\-load\-avail\fP option should
  921. be used instead for that):
  922. .br
  923. \fB dpkg \-l '*vi*'\fP
  924. .br
  925. To see the entries in \fI%ADMINDIR%/available\fP of two packages:
  926. .br
  927. \fB dpkg \-\-print\-avail elvis vim | less\fP
  928. .br
  929. To search the listing of packages yourself:
  930. .br
  931. \fB less %ADMINDIR%/available\fP
  932. .br
  933. To remove an installed elvis package:
  934. .br
  935. \fB dpkg \-r elvis\fP
  936. .br
  937. To install a package, you first need to find it in an archive or
  938. CDROM. The \fIavailable\fP file shows that the vim package is in section
  939. \fBeditors\fP:
  940. .br
  941. \fB cd /media/cdrom/pool/main/v/vim\fP
  942. \fB dpkg \-i vim_4.5\-3.deb\fP
  943. .br
  944. To make a local copy of the package selection states:
  945. .br
  946. \fB dpkg \-\-get\-selections >myselections\fP
  947. .br
  948. You might transfer this file to another computer, and after having updated
  949. the \fIavailable\fP file there with your package manager frontend of choice
  950. (see https://wiki.debian.org/Teams/Dpkg/FAQ for more details), for example:
  951. .br
  952. \fB apt\-cache dumpavail | dpkg \-\-merge\-avail\fP
  953. .br
  954. or with dpkg 1.17.6 and earlier:
  955. .br
  956. \fB avail=`mktemp`\fP
  957. \fB apt\-cache dumpavail >"$avail"\fP
  958. \fB dpkg \-\-merge\-avail "$avail"\fP
  959. \fB rm "$avail"\fP
  960. .br
  961. you can install it with:
  962. .br
  963. \fB dpkg \-\-clear\-selections\fP
  964. \fB dpkg \-\-set\-selections <myselections\fP
  965. .br
  966. Note that this will not actually install or remove anything, but just
  967. set the selection state on the requested packages. You will need some
  968. other application to actually download and install the requested
  969. packages. For example, run \fBapt\-get dselect\-upgrade\fP.
  970. Ordinarily, you will find that \fBdselect\fP(1) provides a more
  971. convenient way to modify the package selection states.
  972. .br
  973. .
  974. .SH ADDITIONAL FUNCTIONALITY
  975. Additional functionality can be gained by installing any of the
  976. following packages: \fBapt\fR, \fBaptitude\fR and \fBdebsums\fR.
  977. .
  978. .SH SEE ALSO
  979. .ad l
  980. \fBaptitude\fP(1),
  981. \fBapt\fP(1),
  982. \fBdselect\fP(1),
  983. \fBdpkg\-deb\fP(1),
  984. \fBdpkg\-query\fP(1),
  985. \fBdeb\fP(5),
  986. \fBdeb\-control\fP(5),
  987. \fBdpkg.cfg\fP(5),
  988. and
  989. \fBdpkg\-reconfigure\fP(8).
  990. .
  991. .SH AUTHORS
  992. See \fI%PKGDOCDIR%/THANKS\fP for the list of people who have
  993. contributed to \fBdpkg\fP.