dpkg.8 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. .TH dpkg 8
  2. .SH NAME
  3. dpkg - a low-level package manager for Debian GNU/Linux
  4. .SH SYNOPSIS
  5. .B dpkg
  6. [options] action
  7. .SH WARNING WARNING WARNING
  8. This manual was inaccurate when it was written and is now also out of
  9. date.
  10. It should
  11. .I not
  12. be used by package maintainers wishing to understand how
  13. .B dpkg
  14. will install their packages.
  15. It may be useful to users wishing to understand
  16. .BR "dpkg"'s
  17. command line options and package states in more detail than that
  18. provided by
  19. .BR "dpkg --help" .
  20. The descriptions of what
  21. .B dpkg
  22. does when installing and removing packages are particularly
  23. inadequate. For detailed information about this please refer to the
  24. Debian Packaging Guidelines, available under
  25. .I guidelines
  26. in the GNU Info system.
  27. .SH DESCRIPTION
  28. .B dpkg
  29. is a medium-level tool to install, build, remove and manage Debian
  30. GNU/Linux packages. The primary and more user-friendly front-end
  31. for
  32. .B dpkg
  33. is
  34. .B dselect(8).
  35. .B dpkg
  36. itself is totally controlled via command line parameters, whose include
  37. one or more options and exactly one action. The action-parameter tells
  38. dpkg what to do and options control the behaviour of the action in some
  39. way.
  40. .B dpkg
  41. can be also be used as a front-end to
  42. .B dpkg-deb.
  43. Actions
  44. .B -b
  45. ,
  46. .B --build
  47. ,
  48. .B -c
  49. ,
  50. .B --contents
  51. ,
  52. .B -I
  53. ,
  54. .B --info
  55. ,
  56. .B -f
  57. ,
  58. .B --field
  59. ,
  60. .B -e
  61. ,
  62. .B --control
  63. ,
  64. .B -x
  65. ,
  66. .B --extract
  67. ,
  68. .B -X
  69. ,
  70. .B --vextract
  71. and
  72. .B --fsys-tarfile
  73. are
  74. .B dpkg-deb
  75. actions and if they are encountered,
  76. .B dpkg
  77. just runs
  78. .B dpkg-deb
  79. with the parameters given to it. Please refer to
  80. .B dpkg-deb(8)
  81. for information about these actions.
  82. .SS ACTIONS
  83. .TP
  84. .B dpkg -i | --install <package file name> ...
  85. Install specified packages. If
  86. .B --recursive
  87. or
  88. .B -R
  89. option is specified,
  90. .I <package file name>
  91. must refer to a directory instead.
  92. Installation consists of the following steps:
  93. .br
  94. .B 1.
  95. Extract the controlfiles of the new package.
  96. .br
  97. .B 2.
  98. If another version of the same package was installed before the
  99. new installation, execute
  100. .I prerm
  101. script of the old package.
  102. .br
  103. .B 3.
  104. Run
  105. .I preinst
  106. script, if provided by the package.
  107. .br
  108. .B 4.
  109. Unpack the files and at the same time, backup the old files
  110. so that if something goes wrong, we can restore them.
  111. .br
  112. .B 5.
  113. If another version of the same package was installed before
  114. the new installation, execute the
  115. .I postrm
  116. script of the old package. Note that this script is executed after the
  117. .I preinst
  118. script of the new package, because new files are written at the same
  119. time, old files are removed.
  120. .br
  121. .B 6.
  122. eonfigure the package. See
  123. .B --configure
  124. for detailed information about how this is done.
  125. .TP
  126. .B dpkg --unpack <package file name> ...
  127. Unpack package, but don't configure it. If
  128. .B --recursive
  129. or
  130. .B -R
  131. option is specified,
  132. .I <package file name>
  133. must refer to a directory instead.
  134. .TP
  135. .B dpkg --configure <package name> ... | -a|--pending
  136. Reconfigure an unpacked package.
  137. If
  138. .B -a
  139. or
  140. .B --pending
  141. is given instead of package name, all unpacked, but unconfigured
  142. packages are configured.
  143. Configuring consists of the following steps:
  144. .br
  145. .B 1.
  146. Unpack the configuration files and at the same time, backup the old
  147. configuration files, so that we can restore them, if
  148. something goes
  149. wrong.
  150. .br
  151. .B 2.
  152. Run
  153. .I postinst
  154. script, if provided by the package.
  155. .TP
  156. .B dpkg -r|--remove | --purge <package name> ... | -a|--pending
  157. Remove an installed package.
  158. .B --purge
  159. removes everything, including configuration files,
  160. .B --remove
  161. removes everything, but not configuration files. (configuration files are
  162. the files listed in
  163. .I conffiles
  164. -control file). If
  165. .B -a
  166. or
  167. .B --pending
  168. is given instead of package name all packages unpacked, but marked to be
  169. removed or purged are removed or purged (in file
  170. .I /var/lib/dpkg/status
  171. ).
  172. Removing of a package consists of the following steps:
  173. .br
  174. .B 1.
  175. Run prerm script
  176. .br
  177. .B 2.
  178. Remove the installed files
  179. .br
  180. .B 3.
  181. Run postrm script
  182. .br
  183. .TP
  184. .B dpkg -A | --avail <package file name> ...
  185. Update
  186. .B dpkg
  187. and
  188. .B dselect's
  189. idea of which packages are available with information about the package
  190. .I <package file name>.
  191. If
  192. .B --recursive
  193. or
  194. .B -R
  195. option is specified,
  196. .I <package file name>
  197. must refer to a directory instead.
  198. .TP
  199. .B dpkg --update-avail | --merge-avail <Packages-file>
  200. Update
  201. .B dpkg's
  202. and
  203. .B dselect's
  204. idea of which packages are available. With action
  205. .B --merge-avail,
  206. information is combined from the old information and from the
  207. .I <Packages-file>.
  208. With action
  209. .B --update-avail,
  210. old information is replaced with the information in the
  211. .I <Packages-file>.
  212. The
  213. .I <Packages-file>
  214. distributed with Debian GNU/Linux is simply named
  215. .I Packages.
  216. .TP
  217. .B dpkg --yet-to-unpack
  218. Searches for packages selected for installation, but which for some
  219. reason still haven't been installed.
  220. .TP
  221. .B dpkg -l|--list [<package-name-pattern> ...]
  222. List packages matching given pattern. If no
  223. .B <package-name-pattern>
  224. is given, list all packages in
  225. .I /var/lib/dpkg/available.
  226. Normal shell wildchars are allowed in
  227. .B <package-name-pattern>.
  228. .TP
  229. .B dpkg -L|--listfiles <package-name> ...
  230. List files installed to your system from a package
  231. .B <package-name>.
  232. However, note that files created by package-specific
  233. installation-scripts are not listed.
  234. .TP
  235. .B dpkg -C|--audit
  236. Searches for packages that have been installed only partially on your
  237. system.
  238. .B dpkg
  239. will suggest what to do with them to get them working.
  240. .TP
  241. .B dpkg -S|--search <filename-search-pattern> ...
  242. Search for a filename from installed packages. All standard shell
  243. wildchars can be used in the pattern.
  244. .TP
  245. .B dpkg -s|--status <package-name> ...
  246. Report status of specified package. This just displays the entry in from
  247. the installed package status database.
  248. .TP
  249. .B dpkg --help
  250. Display a brief help.
  251. .TP
  252. .B dpkg --licence
  253. Display licence of
  254. .B dpkg.
  255. .TP
  256. .B dpkg --version
  257. Display version information.
  258. .TP
  259. .B dpkg-deb-actions
  260. See
  261. .B dpkg-deb(8)
  262. for more information about these actions.
  263. .B dpkg -b|--build <directory> [<filename>]
  264. - Build a Debian GNU/Linux package.
  265. .br
  266. .B dpkg -c|--contents <filename>
  267. - List contents of Debian GNU/Linux package.
  268. .br
  269. .B dpkg -e|--control <filename> [<directory>]
  270. - Extract control-information from a package.
  271. .br
  272. .B dpkg -x|--extract <filename> <directory>
  273. - Extract the files contained by package.
  274. .br
  275. .B dpkg -f|--field <filename> [<control-field>...]
  276. - Display control field(s) of a package.
  277. .br
  278. .B dpkg --fsys-tarfile <filename>
  279. - Display the filesystem tar-file contained by a Debian package.
  280. .br
  281. .B dpkg -I|--info <filename> [<control-file>]
  282. - Show information about a package.
  283. .br
  284. .B dpkg -X|--vextract <filename> <directory>
  285. - Extract and display the filenames contained by a package.
  286. .SS OPTIONS
  287. .TP
  288. .B -B | --auto-deconfigure
  289. While a package is removed, there is a possibility that another
  290. installed package depended on the removed package. Specifying this
  291. option will cause automatical deconfiguration of the package which
  292. depended on the removed package.
  293. .TP
  294. .B -Dh | --debug=help
  295. Give help about debugging options.
  296. .TP
  297. .B -D<octal> | --debug=<octal>
  298. Set debugging on.
  299. .B <octal>
  300. is a octal number formed by bitwise-orring desired values together from
  301. the list below (note that these values may change in future releases).
  302. number description
  303. 1 Generally helpful progress information
  304. 2 Invocation and status of maintainer scripts
  305. 10 Output for each file processed
  306. 100 Lots of output for each file processed
  307. 20 Output for each configuration file
  308. 200 Lots of output for each configuration file
  309. 40 Dependencies and conflicts
  310. 400 Lots of dependencies/conflicts output
  311. 1000 Lots of drivel about eg the dpkg/info dir
  312. 2000 Insane amounts of drivel
  313. .TP
  314. .B --force-<things> | --no-force-<things> | --refuse-<things>
  315. Force or refuse (no-force and refuse stands for the same thing) to do
  316. some things.
  317. .B <things>
  318. is a comma separated list of things specified below:
  319. .I downgrade(*):
  320. Install a package, even if newer version of it is already installed.
  321. .I configure-any:
  322. Configure also unpacked, but unconfigured packages on whose current
  323. package depends on.
  324. .I remove-reinstreq:
  325. Remove a package, even if it's broken and marked to require
  326. reinstallation. This may, for example, cause parts of the package to
  327. remain on the system, which will then be forgotten by
  328. .B dpkg.
  329. .I hold:
  330. Don't care, wheter a package is on hold or not.
  331. .I remove-essential:
  332. Remove, even if the package is considered essential. Essential packages
  333. contains mostly very basic unix commands and such. Removing them might
  334. cause the whole system to stop working, so use with caution.
  335. .I conflicts:
  336. Install, even if it conflicts with another package. This is dangerous,
  337. for it will usually cause overwriting of some files.
  338. .I depends:
  339. Remove, even if another package depends on this one. This will usually
  340. break the other package.
  341. .I depends-version:
  342. Don't care about versions when checking depencies. This will usually
  343. break the other package.
  344. Things marked with (*) are forced by default.
  345. .I Warning:
  346. These options are mostly intended to be used by experts only. Using them
  347. without fully understanding their effects may break your whole system.
  348. .TP
  349. .B --ignore-depends=<package>,...
  350. Ignore depency-checking for specified packages (actually, checking is
  351. performed, but only warnings about conflicts are given, nothing else).
  352. .TP
  353. .B --largemem | --smallmem
  354. Tells
  355. .B dpkg
  356. wheter to preserve memory or consume it as much as needed.
  357. .TP
  358. .B --new | --old
  359. Select new or old package format. This is a
  360. .B dpkg-deb(8)
  361. option.
  362. .TP
  363. .B --nocheck
  364. Don't read or check contents of control file while building a package.
  365. This is a
  366. .B dpkg-deb(8)
  367. option.
  368. .TP
  369. .B --no-act
  370. Do everything, which is supposed to be done, but don't write any
  371. changes. This is used to see, what would happen with specified action,
  372. without actually modifying anything.
  373. Be sure to give
  374. .B --no-act
  375. before action-parameter, or you might end up with undesirable results.
  376. (e.g.
  377. .B dpkg --purge foo --no-act
  378. will first purge package foo and then try to purge package --no-act,
  379. even though you propably expected it to actually do nothing)
  380. .TP
  381. .B -R | --recursive
  382. Recursively handle all regular files matching pattern
  383. .I *.deb
  384. found at specified directories and all of its subdirectories. This
  385. can be used with
  386. .B -i
  387. ,
  388. .B -A
  389. ,
  390. .B --install
  391. ,
  392. .B --unpack
  393. and
  394. .B --avail
  395. actions.
  396. .TP
  397. .B -G
  398. Don't install package, if newer version of the same package is already
  399. installed. This is an alias to
  400. .B--refuse-downgrade.
  401. .TP
  402. .B -R|--root=<dir> | --admindir=<dir> | --instdir=<dir>
  403. Change default directories.
  404. .B admindir
  405. defaults to
  406. .I /var/lib/dpkg
  407. and contains many files that give information about status of installed
  408. or uninstalled packages, etc.
  409. .B instdir
  410. defaults to
  411. .I /
  412. and refers to the directory where packages are to be installed.
  413. .B instdir
  414. is also the directory passed to
  415. .B chroot(2)
  416. before running package's installation scripts, which means that the
  417. scripts see
  418. .B instdir
  419. as a root directory.
  420. Changing
  421. .B root
  422. changes
  423. .B instdir
  424. to
  425. .I <dir>
  426. and
  427. .B admindir
  428. to
  429. .I <dir>/var/lib/dpkg.
  430. .TP
  431. .B -O | --selected-only
  432. Only process the packages that are selected for installation. The actual
  433. marking is done with
  434. .B dselect
  435. or by
  436. .B dpkg,
  437. when it handles packages. i.e. When, for example a package is removed,
  438. it will be marked selected for installation, etc.
  439. .TP
  440. .B -E | --skip-same-version
  441. Don't install the package, if the same version of the package is already
  442. installed.
  443. .SH INFORMATION ABOUT PACKAGES
  444. .B dpkg
  445. maintains some usable information about available packages. The
  446. information is divided in three classes:
  447. .B states
  448. ,
  449. .B selection states
  450. and
  451. .B flags.
  452. These values are intended to be changed mainly with
  453. .B dselect.
  454. .SS PACKAGE STATES
  455. .TP
  456. .B installed
  457. The package is unpacked and configured ok.
  458. .TP
  459. .B half-installed
  460. The installation of the package has been started, but not completed for
  461. some reason.
  462. .TP
  463. .B not-installed
  464. The package is not installed on your system.
  465. .TP
  466. .B unpacked
  467. The package is unpacked, but not configured.
  468. .TP
  469. .B half-configured
  470. The package is unpacked and configuration has been started, but not yet
  471. completed for some reason.
  472. .TP
  473. .B config-files
  474. Only the configuration files of the package exist on the system.
  475. .SS PACKAGE SELECTION STATES
  476. .TP
  477. .B install
  478. The package is selected for installation.
  479. .TP
  480. .B deinstall
  481. The package is selected for deinstallation (i.e. we want to remove all
  482. files, except configuration files).
  483. .TP
  484. .B purge
  485. The package is selected to be purged (i.e. we want to remove everything,
  486. even configuration files).
  487. .SS PACKAGE FLAGS
  488. .TP
  489. .B hold
  490. A package marked to be on
  491. .B hold
  492. is not handled by
  493. .B dpkg,
  494. unless forced to do that with option
  495. .B --force-hold.
  496. .TP
  497. .B reinst-required
  498. A package marked
  499. .B reinst-required
  500. is broken and requires reinstallation. These packages cannot be removed,
  501. unless forced with option
  502. .B --force-reinstreq.
  503. .SH FILES
  504. The files listed here are in their default directories, see option
  505. .B --admindir
  506. to see how to change locations of these files.
  507. .TP
  508. .I /var/lib/dpkg/available
  509. List of available packages.
  510. .TP
  511. .I /var/lib/dpkg/status
  512. Statuses of available packages. This file contains information about
  513. wheter a package is marked for removing or not, wheter it is installed
  514. or not, etc. See section
  515. .B INFORMATION ABOUT PACKAGES
  516. for more info.
  517. .TP
  518. .I control
  519. See
  520. .B deb(5)
  521. for more information about this file.
  522. .TP
  523. .I conffiles
  524. .B dpkg.
  525. See
  526. .B deb(5)
  527. for more information about this file.
  528. .TP
  529. .I preinst
  530. See
  531. .B deb(5)
  532. for more information about this file.
  533. .TP
  534. .I postinst
  535. See
  536. .B deb(5)
  537. for more information about this file.
  538. .TP
  539. .I prerm
  540. See
  541. .B deb(5)
  542. for more information about this file.
  543. .TP
  544. .I postrm
  545. See
  546. .B deb(5)
  547. for more information about this file.
  548. .SH ENVIRONMENT VARIABLES
  549. .TP
  550. .B DPKG_NO_TSTP
  551. Define this to something, if you prefer
  552. .B dpkg
  553. starting a new shell rather than suspending
  554. .B dpkg,
  555. while doing a shell escape.
  556. .TP
  557. .B SHELL
  558. The program
  559. .B dpkg
  560. will execute while starting a new shell.
  561. .SH SEE ALSO
  562. .B deb(5)
  563. ,
  564. .B dpkg-deb(8)
  565. ,
  566. .B dselect(8)
  567. and
  568. .B deb-control(5)
  569. .SH BUGS
  570. .B --no-act
  571. usually gives less information that might be helpful.
  572. .SH AUTHOR
  573. .B dpkg
  574. is written by Ian Jackson (ian@chiark.chu.cam.ac.uk). Manual page added
  575. by Juho Vuori (javuori@cc.helsinki.fi).