1dpkg(1)                           dpkg suite                           dpkg(1)
2
3
4

NAME

6       dpkg - package manager for Debian
7

SYNOPSIS

9       dpkg [option...] action
10

WARNING

12       This  manual is intended for users wishing to understand dpkg's command
13       line options and package states in more detail than  that  provided  by
14       dpkg --help.
15
16       It  should not be used by package maintainers wishing to understand how
17       dpkg will install their packages. The descriptions of  what  dpkg  does
18       when installing and removing packages are particularly inadequate.
19

DESCRIPTION

21       dpkg  is  a  tool to install, build, remove and manage Debian packages.
22       The primary and more user-friendly front-end for dpkg  is  aptitude(1).
23       dpkg  itself  is controlled entirely via command line parameters, which
24       consist of exactly one action and zero or  more  options.  The  action-
25       parameter tells dpkg what to do and options control the behavior of the
26       action in some way.
27
28       dpkg can also be used as a front-end to dpkg-deb(1) and  dpkg-query(1).
29       The  list  of  supported  actions  can be found later on in the ACTIONS
30       section. If any such action is encountered dpkg just runs  dpkg-deb  or
31       dpkg-query with the parameters given to it, but no specific options are
32       currently passed to them, to use any such option the back-ends need  to
33       be called directly.
34

INFORMATION ABOUT PACKAGES

36       dpkg  maintains  some  usable information about available packages. The
37       information is divided in three classes: states, selection  states  and
38       flags. These values are intended to be changed mainly with dselect.
39
40   Package states
41       not-installed
42              The package is not installed on your system.
43
44       config-files
45              Only the configuration files of the package exist on the system.
46
47       half-installed
48              The  installation  of  the  package  has  been  started, but not
49              completed for some reason.
50
51       unpacked
52              The package is unpacked, but not configured.
53
54       half-configured
55              The package is unpacked and configuration has been started,  but
56              not yet completed for some reason.
57
58       triggers-awaited
59              The package awaits trigger processing by another package.
60
61       triggers-pending
62              The package has been triggered.
63
64       installed
65              The package is correctly unpacked and configured.
66
67   Package selection states
68       install
69              The package is selected for installation.
70
71       hold   A  package  marked  to be on hold is not handled by dpkg, unless
72              forced to do that with option --force-hold.
73
74       deinstall
75              The package is selected for  deinstallation  (i.e.  we  want  to
76              remove all files, except configuration files).
77
78       purge  The  package  is  selected  to be purged (i.e. we want to remove
79              everything from system directories, even configuration files).
80
81   Package flags
82       ok     A package marked ok is in a known state, but might need  further
83              processing.
84
85       reinstreq
86              A    package   marked   reinstreq   is   broken   and   requires
87              reinstallation. These packages cannot be removed, unless  forced
88              with option --force-remove-reinstreq.
89

ACTIONS

91       -i, --install package-file...
92              Install  the  package. If --recursive or -R option is specified,
93              package-file must refer to a directory instead.
94
95              Installation consists of the following steps:
96
97              1. Extract the control files of the new package.
98
99              2. If another version of the same package was  installed  before
100              the new installation, execute prerm script of the old package.
101
102              3. Run preinst script, if provided by the package.
103
104              4.  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
107              5. If another version of the same package was  installed  before
108              the  new  installation,  execute  the  postrm  script of the old
109              package. Note that this script is  executed  after  the  preinst
110              script  of the new package, because new files are written at the
111              same time old files are removed.
112
113              6.  Configure  the  package.  See   --configure   for   detailed
114              information about how this is done.
115
116       --unpack package-file...
117              Unpack the package, but don't configure it. If --recursive or -R
118              option is specified, package-file  must  refer  to  a  directory
119              instead.
120
121       --configure package...|-a|--pending
122              Configure  a  package  which  has  been  unpacked  but  not  yet
123              configured.  If -a or --pending is given instead of package, all
124              unpacked but unconfigured packages are configured.
125
126              To  reconfigure a package which has already been configured, try
127              the dpkg-reconfigure(8) command instead.
128
129              Configuring consists of the following steps:
130
131              1. Unpack the conffiles, and at the same time back  up  the  old
132              conffiles, so that they can be restored if something goes wrong.
133
134              2. Run postinst script, if provided by the package.
135
136       --triggers-only package...|-a|--pending
137              Processes  only  triggers  (since  dpkg  1.14.17).   All pending
138              triggers will be processed.  If package names are supplied  only
139              those  packages'  triggers  will be processed, exactly once each
140              where necessary. Use of this option may leave  packages  in  the
141              improper  triggers-awaited and triggers-pending states. This can
142              be fixed later by running: dpkg --configure --pending.
143
144       -r, --remove package...|-a|--pending
145              Remove an installed  package.  This  removes  everything  except
146              conffiles,  which may avoid having to reconfigure the package if
147              it is reinstalled later (conffiles are configuration files  that
148              are  listed  in  the  DEBIAN/conffiles  control file).  If -a or
149              --pending is given instead of a package name, then all  packages
150              unpacked, but marked to be removed in file /var/lib/dpkg/status,
151              are removed.
152
153              Removing of a package consists of the following steps:
154
155              1. Run prerm script
156
157              2. Remove the installed files
158
159              3. Run postrm script
160
161
162       -P, --purge package...|-a|--pending
163              Purge an installed or  already  removed  package.  This  removes
164              everything,  including  conffiles.   If -a or --pending is given
165              instead of  a  package  name,  then  all  packages  unpacked  or
166              removed,  but  marked to be purged in file /var/lib/dpkg/status,
167              are purged.
168
169              Note: some configuration files might be unknown to dpkg  because
170              they   are   created   and   handled   separately   through  the
171              configuration scripts. In that case, dpkg won't remove  them  by
172              itself,  but  the  package's  postrm  script (which is called by
173              dpkg), has to take  care  of  their  removal  during  purge.  Of
174              course,  this  only  applies to files in system directories, not
175              configuration  files   written   to   individual   users'   home
176              directories.
177
178              Purging of a package consists of the following steps:
179
180              1.  Remove the package, if not already removed. See --remove for
181              detailed information about how this is done.
182
183              2. Run postrm script.
184
185       -V, --verify [package-name...]
186              Verifies the  integrity  of  package-name  or  all  packages  if
187              omitted,  by comparing information from the files installed by a
188              package with the files metadata information stored in  the  dpkg
189              database  (since dpkg 1.17.2).  The origin of the files metadata
190              information in the database is the binary  packages  themselves.
191              That  metadata  gets collected at package unpack time during the
192              installation process.
193
194              Currently the only  functional  check  performed  is  an  md5sum
195              verification  of  the  file contents against the stored value in
196              the files database.  It will only get checked  if  the  database
197              contains  the  file md5sum. To check for any missing metadata in
198              the database, the --audit command can be used.
199
200              The output format is selectable with the --verify-format option,
201              which  by  default uses the rpm format, but that might change in
202              the future, and as such, programs parsing  this  command  output
203              should be explicit about the format they expect.
204
205       -C, --audit [package-name...]
206              Performs database sanity and consistency checks for package-name
207              or all packages  if  omitted  (per  package  checks  since  dpkg
208              1.17.10).   For  example,  searches  for packages that have been
209              installed only partially on your system or  that  have  missing,
210              wrong  or obsolete control data or files. dpkg will suggest what
211              to do with them to get them fixed.
212
213       --update-avail [Packages-file]
214       --merge-avail [Packages-file]
215              Update  dpkg's  and  dselect's  idea  of  which   packages   are
216              available.   With   action  --merge-avail,  old  information  is
217              combined  with  information  from  Packages-file.  With   action
218              --update-avail, old information is replaced with the information
219              in the Packages-file. The Packages-file distributed with  Debian
220              is  simply  named  «Packages».  If the Packages-file argument is
221              missing or named «-» then it will be read  from  standard  input
222              (since dpkg 1.17.7). dpkg keeps its record of available packages
223              in /var/lib/dpkg/available.
224
225              A simpler one-shot command to retrieve and update the  available
226              file is dselect update. Note that this file is mostly useless if
227              you don't use dselect but an APT-based frontend: APT has its own
228              system to keep track of available packages.
229
230       -A, --record-avail package-file...
231              Update  dpkg  and dselect's idea of which packages are available
232              with information from the package package-file.  If  --recursive
233              or  -R  option  is  specified,  package-file  must  refer  to  a
234              directory instead.
235
236       --forget-old-unavail
237              Now obsolete and a  no-op  as  dpkg  will  automatically  forget
238              uninstalled  unavailable  packages (since dpkg 1.15.4), but only
239              those that do not  contain  user  information  such  as  package
240              selections.
241
242       --clear-avail
243              Erase   the   existing   information  about  what  packages  are
244              available.
245
246       --get-selections [package-name-pattern...]
247              Get list of package selections, and write it to stdout.  Without
248              a  pattern,  non-installed  packages (i.e. those which have been
249              previously purged) will not be shown.
250
251       --set-selections
252              Set package selections using file read  from  stdin.  This  file
253              should  be  in the format “package state”, where state is one of
254              install, hold, deinstall or purge. Blank lines and comment lines
255              beginning with ‘#’ are also permitted.
256
257              The available file needs to be up-to-date for this command to be
258              useful, otherwise  unknown  packages  will  be  ignored  with  a
259              warning.  See  the --update-avail and --merge-avail commands for
260              more information.
261
262       --clear-selections
263              Set the  requested  state  of  every  non-essential  package  to
264              deinstall  (since  dpkg  1.13.18).   This is intended to be used
265              immediately before --set-selections, to deinstall  any  packages
266              not in list given to --set-selections.
267
268       --yet-to-unpack
269              Searches  for  packages selected for installation, but which for
270              some reason still haven't been installed.
271
272       --predep-package
273              Print a single package which  is  the  target  of  one  or  more
274              relevant  pre-dependencies  and  has  itself no unsatisfied pre-
275              dependencies.
276
277              If such a package is present,  output  it  as  a  Packages  file
278              entry, which can be massaged as appropriate.
279
280              Returns  0 when a package is printed, 1 when no suitable package
281              is available and 2 on error.
282
283       --add-architecture architecture
284              Add architecture to the list of architectures for which packages
285              can  be installed without using --force-architecture (since dpkg
286              1.16.2).  The architecture dpkg is built for (i.e. the output of
287              --print-architecture) is always part of that list.
288
289       --remove-architecture architecture
290              Remove  architecture  from  the  list of architectures for which
291              packages can be  installed  without  using  --force-architecture
292              (since  dpkg 1.16.2). If the architecture is currently in use in
293              the database then the  operation  will  be  refused,  except  if
294              --force-architecture  is  specified.  The  architecture  dpkg is
295              built for (i.e. the output of --print-architecture) can never be
296              removed from that list.
297
298       --print-architecture
299              Print  architecture  of  packages  dpkg  installs  (for example,
300              “i386”).
301
302       --print-foreign-architectures
303              Print a newline-separated list of the extra  architectures  dpkg
304              is  configured to allow packages to be installed for (since dpkg
305              1.16.2).
306
307       --assert-feature
308              Asserts that dpkg supports the requested feature.  Returns 0  if
309              the  feature  is  fully supported, 1 if the feature is known but
310              dpkg cannot provide support for it yet, and 2 if the feature  is
311              unknown.  The current list of assertable features is:
312
313              support-predepends
314                     Supports the Pre-Depends field (since dpkg 1.1.0).
315
316              working-epoch
317                     Supports epochs in version strings (since dpkg 1.4.0.7).
318
319              long-filenames
320                     Supports  long  filenames  in deb(5) archives (since dpkg
321                     1.4.1.17).
322
323              multi-conrep
324                     Supports multiple  Conflicts  and  Replaces  (since  dpkg
325                     1.4.1.19).
326
327              multi-arch
328                     Supports  multi-arch  fields  and  semantics  (since dpkg
329                     1.16.2).
330
331              versioned-provides
332                     Supports versioned Provides (since dpkg 1.17.11).
333
334       --validate-thing string
335              Validate that the thing string has a correct syntax (since  dpkg
336              1.18.16).   Returns 0 if the string is valid, 1 if the string is
337              invalid but might be accepted in lax  contexts,  and  2  if  the
338              string is invalid.  The current list of validatable things is:
339
340              pkgname
341                     Validates the given package name (since dpkg 1.18.16).
342
343              trigname
344                     Validates the given trigger name (since dpkg 1.18.16).
345
346              archname
347                     Validates   the   given  architecture  name  (since  dpkg
348                     1.18.16).
349
350              version
351                     Validates the given version (since dpkg 1.18.16).
352
353       --compare-versions ver1 op ver2
354              Compare version numbers, where op is  a  binary  operator.  dpkg
355              returns  true  (0)  if the specified condition is satisfied, and
356              false (1) otherwise. There are two groups  of  operators,  which
357              differ  in  how they treat an empty ver1 or ver2. These treat an
358              empty version as earlier than any version: lt le eq  ne  ge  gt.
359              These  treat  an  empty version as later than any version: lt-nl
360              le-nl ge-nl gt-nl. These are  provided  only  for  compatibility
361              with  control  file  syntax:  <  <<  <=  =  >= >> >. The < and >
362              operators are obsolete and should not be used, due to  confusing
363              semantics. To illustrate: 0.1 < 0.1 evaluates to true.
364
365       -?, --help
366              Display a brief help message.
367
368       --force-help
369              Give help about the --force-thing options.
370
371       -Dh, --debug=help
372              Give help about debugging options.
373
374       --version
375              Display dpkg version information.
376
377       dpkg-deb actions
378              See   dpkg-deb(1)  for  more  information  about  the  following
379              actions.
380
381              -b, --build directory [archive|directory]
382                  Build a deb package.
383              -c, --contents archive
384                  List contents of a deb package.
385              -e, --control archive [directory]
386                  Extract control-information from a package.
387              -x, --extract archive directory
388                  Extract the files contained by package.
389              -X, --vextract archive directory
390                  Extract and display the filenames contained by a
391                  package.
392              -f, --field  archive [control-field...]
393                  Display control field(s) of a package.
394              --ctrl-tarfile archive
395                  Output the control tar-file contained in a Debian package.
396              --fsys-tarfile archive
397                  Output the filesystem tar-file contained by a Debian package.
398              -I, --info archive [control-file...]
399                  Show information about a package.
400
401
402       dpkg-query actions
403              See dpkg-query(1)  for  more  information  about  the  following
404              actions.
405
406
407              -l, --list package-name-pattern...
408                  List packages matching given pattern.
409              -s, --status package-name...
410                  Report status of specified package.
411              -L, --listfiles package-name...
412                  List files installed to your system from package-name.
413              -S, --search filename-search-pattern...
414                  Search for a filename from installed packages.
415              -p, --print-avail package-name...
416                  Display details about package-name, as found in
417                  /var/lib/dpkg/available. Users of APT-based frontends
418                  should use apt-cache show package-name instead.
419

OPTIONS

421       All  options  can be specified both on the command line and in the dpkg
422       configuration file /etc/dpkg/dpkg.cfg or  fragment  files  (with  names
423       matching  this  shell  pattern  '[0-9a-zA-Z_-]*')  on the configuration
424       directory /etc/dpkg/dpkg.cfg.d/. Each line in the configuration file is
425       either  an  option  (exactly  the  same  as the command line option but
426       without leading hyphens) or a comment (if it starts with a ‘#’).
427
428       --abort-after=number
429              Change after how many errors dpkg will abort. The default is 50.
430
431       -B, --auto-deconfigure
432              When a package is removed, there is a possibility  that  another
433              installed  package  depended  on the removed package. Specifying
434              this option will cause automatic deconfiguration of the  package
435              which depended on the removed package.
436
437       -Doctal, --debug=octal
438              Switch  debugging  on.  octal is formed by bitwise-oring desired
439              values together from the list below (note that these values  may
440              change  in  future  releases). -Dh or --debug=help display these
441              debugging values.
442
443                  Number   Description
444                       1   Generally helpful progress information
445                       2   Invocation and status of maintainer scripts
446                      10   Output for each file processed
447                     100   Lots of output for each file processed
448                      20   Output for each configuration file
449                     200   Lots of output for each configuration file
450                      40   Dependencies and conflicts
451                     400   Lots of dependencies/conflicts output
452                   10000   Trigger activation and processing
453                   20000   Lots of output regarding triggers
454                   40000   Silly amounts of output regarding triggers
455                    1000   Lots of drivel about e.g. the dpkg/info dir
456                    2000   Insane amounts of drivel
457
458       --force-things
459       --no-force-things, --refuse-things
460              Force or refuse (no-force and refuse mean the same thing) to  do
461              some  things.  things  is  a  comma  separated  list  of  things
462              specified below.  --force-help  displays  a  message  describing
463              them.  Things marked with (*) are forced by default.
464
465              Warning: These options are mostly intended to be used by experts
466              only. Using them without fully understanding their  effects  may
467              break your whole system.
468
469              all: Turns on (or off) all force options.
470
471              downgrade(*):  Install a package, even if newer version of it is
472              already installed.
473
474              Warning: At present dpkg does not do any dependency checking  on
475              downgrades  and  therefore  will  not  warn you if the downgrade
476              breaks the dependency of  some  other  package.  This  can  have
477              serious  side  effects,  downgrading essential system components
478              can even make your whole system unusable. Use with care.
479
480              configure-any: Configure  also  any  unpacked  but  unconfigured
481              packages on which the current package depends.
482
483              hold: Process packages even when marked “hold”.
484
485              remove-reinstreq:  Remove  a  package,  even  if it's broken and
486              marked to require reinstallation. This may, for  example,  cause
487              parts of the package to remain on the system, which will then be
488              forgotten by dpkg.
489
490              remove-essential: Remove, even  if  the  package  is  considered
491              essential.  Essential  packages  contain  mostly very basic Unix
492              commands. Removing them might cause the  whole  system  to  stop
493              working, so use with caution.
494
495              depends: Turn all dependency problems into warnings.
496
497              depends-version:   Don't   care  about  versions  when  checking
498              dependencies.
499
500              breaks: Install, even if this would break another package (since
501              dpkg 1.14.6).
502
503              conflicts:  Install,  even if it conflicts with another package.
504              This is dangerous, for it will usually cause overwriting of some
505              files.
506
507              confmiss: Always install the missing conffile without prompting.
508              This is dangerous,  since  it  means  not  preserving  a  change
509              (removing) made to the file.
510
511              confnew:  If a conffile has been modified and the version in the
512              package did change,  always  install  the  new  version  without
513              prompting,  unless  the  --force-confdef  is  also specified, in
514              which case the default action is preferred.
515
516              confold: If a conffile has been modified and the version in  the
517              package   did  change,  always  keep  the  old  version  without
518              prompting, unless the  --force-confdef  is  also  specified,  in
519              which case the default action is preferred.
520
521              confdef:  If a conffile has been modified and the version in the
522              package did change, always choose  the  default  action  without
523              prompting. If there is no default action it will stop to ask the
524              user unless --force-confnew  or  --force-confold  is  also  been
525              given,  in  which  case  it  will  use  that to decide the final
526              action.
527
528              confask: If a conffile has been modified always offer to replace
529              it  with  the version in the package, even if the version in the
530              package  did  not  change  (since  dpkg  1.15.8).   If  any   of
531              --force-confnew,  --force-confold,  or  --force-confdef  is also
532              given, it will be used to decide the final action.
533
534              overwrite: Overwrite one package's file with another's file.
535
536              overwrite-dir: Overwrite one package's directory with  another's
537              file.
538
539              overwrite-diverted: Overwrite a diverted file with an undiverted
540              version.
541
542              unsafe-io: Do not perform safe  I/O  operations  when  unpacking
543              (since  dpkg  1.15.8.6).   Currently this implies not performing
544              file system syncs before file renames, which is known  to  cause
545              substantial   performance  degradation  on  some  file  systems,
546              unfortunately the ones that require the safe I/O  on  the  first
547              place  due  to  their  unreliable  behaviour causing zero-length
548              files on abrupt system crashes.
549
550              Note: For ext4, the main offender, consider  using  instead  the
551              mount  option  nodelalloc,  which  will fix both the performance
552              degradation and the data safety issues, the latter by making the
553              file  system  not  produce  zero-length  files  on abrupt system
554              crashes with any software not doing syncs before atomic renames.
555
556              Warning: Using this option might improve performance at the cost
557              of losing data, use with care.
558
559              script-chrootless:  Run  maintainer  scrips without chroot(2)ing
560              into instdir even if the package does not support this  mode  of
561              operation (since dpkg 1.18.5).
562
563              Warning:  This  can  destroy  your host system, use with extreme
564              care.
565
566              architecture:  Process  even   packages   with   wrong   or   no
567              architecture.
568
569              bad-version:  Process  even  packages with wrong versions (since
570              dpkg 1.16.1).
571
572              bad-path: PATH is missing important programs,  so  problems  are
573              likely.
574
575              not-root: Try to (de)install things even when not root.
576
577              bad-verify:  Install  a  package  even  if it fails authenticity
578              check.
579
580
581       --ignore-depends=package,...
582              Ignore dependency-checking  for  specified  packages  (actually,
583              checking  is  performed,  but  only warnings about conflicts are
584              given, nothing else).
585
586       --no-act, --dry-run, --simulate
587              Do everything which is supposed to be done, but don't write  any
588              changes.  This  is  used  to  see  what  would  happen  with the
589              specified action, without actually modifying anything.
590
591              Be sure to give --no-act before  the  action-parameter,  or  you
592              might  end  up  with undesirable results. (e.g. dpkg --purge foo
593              --no-act will first purge package foo  and  then  try  to  purge
594              package  --no-act,  even  though  you  probably  expected  it to
595              actually do nothing)
596
597       -R, --recursive
598              Recursively handle all  regular  files  matching  pattern  *.deb
599              found  at  specified  directories and all of its subdirectories.
600              This  can  be  used  with  -i,  -A,  --install,   --unpack   and
601              --record-avail actions.
602
603       -G     Don't  install  a package if a newer version of the same package
604              is already installed. This is an alias of --refuse-downgrade.
605
606       --admindir=dir
607              Change default administrative  directory,  which  contains  many
608              files  that  give  information  about  status  of  installed  or
609              uninstalled packages, etc.  (Defaults to «/var/lib/dpkg»)
610
611       --instdir=dir
612              Change  default  installation  directory  which  refers  to  the
613              directory  where  packages  are to be installed. instdir is also
614              the directory  passed  to  chroot(2)  before  running  package's
615              installation  scripts,  which means that the scripts see instdir
616              as a root directory.  (Defaults to «/»)
617
618       --root=dir
619              Changing  root  changes  instdir  to  «dir»  and   admindir   to
620              «dir/var/lib/dpkg».
621
622       -O, --selected-only
623              Only  process  the  packages that are selected for installation.
624              The actual marking is done with dselect  or  by  dpkg,  when  it
625              handles  packages.  For  example,  when a package is removed, it
626              will be marked selected for deinstallation.
627
628       -E, --skip-same-version
629              Don't install the package if the same version of the package  is
630              already installed.
631
632       --pre-invoke=command
633       --post-invoke=command
634              Set an invoke hook command to be run via “sh -c” before or after
635              the dpkg run for the unpack, configure, install,  triggers-only,
636              remove,  purge,  add-architecture  and  remove-architecture dpkg
637              actions    (since    dpkg    1.15.4;    add-architecture     and
638              remove-architecture actions since dpkg 1.17.19). This option can
639              be specified multiple times. The order the options are specified
640              is  preserved, with the ones from the configuration files taking
641              precedence.  The environment variable  DPKG_HOOK_ACTION  is  set
642              for the hooks to the current dpkg action. Note: front-ends might
643              call dpkg several times per  invocation,  which  might  run  the
644              hooks more times than expected.
645
646       --path-exclude=glob-pattern
647       --path-include=glob-pattern
648              Set  glob-pattern  as  a path filter, either by excluding or re-
649              including  previously  excluded  paths  matching  the  specified
650              patterns during install (since dpkg 1.15.8).
651
652              Warning:  take into account that depending on the excluded paths
653              you might completely break your system, use with caution.
654
655              The glob patterns use the same wildcards used in the shell, were
656              ‘*’  matches  any  sequence  of  characters, including the empty
657              string  and  also  ‘/’.   For  example,  «/usr/*/READ*»  matches
658              «/usr/share/doc/package/README».   As  usual,  ‘?’  matches  any
659              single character (again,  including  ‘/’).   And  ‘[’  starts  a
660              character  class, which can contain a list of characters, ranges
661              and complementations. See glob(7) for detailed information about
662              globbing. Note: the current implementation might re-include more
663              directories and symlinks than needed, to be on the safe side and
664              avoid possible unpack failures; future work might fix this.
665
666              This  can  be  used  to  remove all paths except some particular
667              ones; a typical case is:
668
669              --path-exclude=/usr/share/doc/*
670              --path-include=/usr/share/doc/*/copyright
671
672              to remove all documentation files except the copyright files.
673
674              These  two  options  can  be  specified  multiple   times,   and
675              interleaved  with  each  other.  Both are processed in the given
676              order, with the last rule that matches a file  name  making  the
677              decision.
678
679              The  filters are applied when unpacking the binary packages, and
680              as such only have knowledge of  the  type  of  object  currently
681              being  filtered (e.g. a normal file or a directory) and have not
682              visibility of  what  objects  will  come  next.   Because  these
683              filters  have  side  effects  (in  contrast to find(1) filters),
684              excluding an exact pathname  that  happens  to  be  a  directory
685              object like /usr/share/doc will not have the desired result, and
686              only  that  pathname  will   be   excluded   (which   could   be
687              automatically  reincluded  if  the  code  sees  the  need).  Any
688              subsequent files contained within that directory  will  fail  to
689              unpack.
690
691              Hint: make sure the globs are not expanded by your shell.
692
693       --verify-format format-name
694              Sets  the  output  format  for  the --verify command (since dpkg
695              1.17.2).
696
697              The  only  currently  supported  output  format  is  rpm,  which
698              consists  of  a  line for every path that failed any check.  The
699              lines start with 9 characters  to  report  each  specific  check
700              result,  a  ‘?’  implies  the  check  could not be done (lack of
701              support, file permissions, etc), ‘.’ implies the  check  passed,
702              and  an  alphanumeric character implies a specific check failed;
703              the md5sum verification failure (the file contents have changed)
704              is  denoted  with  a  ‘5’  on  the third character.  The line is
705              followed by a space and an attribute  character  (currently  ‘c
706              for conffiles), another space and the pathname.
707
708       --status-fd n
709              Send machine-readable package status and progress information to
710              file descriptor n. This option can be specified multiple  times.
711              The  information is generally one record per line, in one of the
712              following forms:
713
714              status: package: status
715                     Package status changed; status is as in the status file.
716
717              status: package : error : extended-error-message
718                     An error occurred. Any  possible  newlines  in  extended-
719                     error-message will be converted to spaces before output.
720
721              status:   file   :   conffile-prompt   :  'real-old'  'real-new'
722              useredited distedited
723                     User is being asked a conffile question.
724
725              processing: stage: package
726                     Sent just before a processing stage starts. stage is  one
727                     of   upgrade,   install  (both  sent  before  unpacking),
728                     configure, trigproc, disappear, remove, purge.
729
730       --status-logger=command
731              Send machine-readable package status and progress information to
732              the shell command's standard input, to be run via “sh -c” (since
733              dpkg 1.16.0).  This option can be specified multiple times.  The
734              output format used is the same as in --status-fd.
735
736       --log=filename
737              Log  status  change  updates and actions to filename, instead of
738              the default /var/log/dpkg.log. If this option is given  multiple
739              times, the last filename is used. Log messages are of the form:
740
741              YYYY-MM-DD HH:MM:SS startup type command
742                     For  each  dpkg invocation where type is archives (with a
743                     command of unpack or install) or packages (with a command
744                     of configure, triggers-only, remove or purge).
745
746              YYYY-MM-DD HH:MM:SS status state pkg installed-version
747                     For status change updates.
748
749              YYYY-MM-DD  HH:MM:SS  action  pkg  installed-version  available-
750              version
751                     For actions where action  is  one  of  install,  upgrade,
752                     configure, trigproc, disappear, remove or purge.
753
754              YYYY-MM-DD HH:MM:SS conffile filename decision
755                     For  conffile changes where decision is either install or
756                     keep.
757
758       --no-debsig
759              Do not try to verify package signatures.
760
761       --no-triggers
762              Do not run any triggers in this run (since  dpkg  1.14.17),  but
763              activations  will  still  be recorded.  If used with --configure
764              package  or  --triggers-only  package  then  the  named  package
765              postinst  will  still  be  run  even  if  only a triggers run is
766              needed. Use of this option may leave packages  in  the  improper
767              triggers-awaited  and triggers-pending states. This can be fixed
768              later by running: dpkg --configure --pending.
769
770       --triggers
771              Cancels a previous --no-triggers (since dpkg 1.14.17).
772

EXIT STATUS

774       0      The requested action was successfully performed.  Or a check  or
775              assertion command returned true.
776
777       1      A check or assertion command returned false.
778
779       2      Fatal  or unrecoverable error due to invalid command-line usage,
780              or interactions  with  the  system,  such  as  accesses  to  the
781              database, memory allocations, etc.
782

ENVIRONMENT

784   External environment
785       PATH   This  variable  is expected to be defined in the environment and
786              point to the system paths where several required programs are to
787              be  found.  If  it's not set or the programs are not found, dpkg
788              will abort.
789
790       HOME   If set, dpkg will use it as the directory from which to read the
791              user specific configuration file.
792
793       TMPDIR If  set,  dpkg  will  use it as the directory in which to create
794              temporary files and directories.
795
796       PAGER  The program dpkg will execute when displaying the conffiles.
797
798       SHELL  The program dpkg will execute when starting  a  new  interactive
799              shell.
800
801       COLUMNS
802              Sets  the  number  of  columns  dpkg  should use when displaying
803              formatted text.  Currently only used by --list.
804
805       DPKG_COLORS
806              Sets the color mode (since dpkg 1.18.5).  The currently accepted
807              values are: auto (default), always and never.
808
809   Internal environment
810       DPKG_ROOT
811              Defined by dpkg on the maintainer script environment to indicate
812              which installation to act on (since dpkg 1.18.5).  The value  is
813              intended  to be prepended to any path maintainer scripts operate
814              on.  During normal operation,  this  variable  is  empty.   When
815              installing  packages  into  a  different  instdir, dpkg normally
816              invokes maintainer  scripts  using  chroot(2)  and  leaves  this
817              variable  empty,  but  if --force-script-chrootless is specified
818              then the chroot(2) call is skipped and instdir is non-empty.
819
820       DPKG_ADMINDIR
821              Defined by dpkg on the maintainer script environment to indicate
822              the  dpkg  administrative  directory to use (since dpkg 1.16.0).
823              This variable is always set to the current --admindir value.
824
825       DPKG_SHELL_REASON
826              Defined by dpkg on the shell spawned on the conffile  prompt  to
827              examine the situation (since dpkg 1.15.6).  Current valid value:
828              conffile-prompt.
829
830       DPKG_CONFFILE_OLD
831              Defined by dpkg on the shell spawned on the conffile  prompt  to
832              examine the situation (since dpkg 1.15.6).  Contains the path to
833              the old conffile.
834
835       DPKG_CONFFILE_NEW
836              Defined by dpkg on the shell spawned on the conffile  prompt  to
837              examine the situation (since dpkg 1.15.6).  Contains the path to
838              the new conffile.
839
840       DPKG_HOOK_ACTION
841              Defined by dpkg on the  shell  spawned  when  executing  a  hook
842              action (since dpkg 1.15.4).  Contains the current dpkg action.
843
844       DPKG_RUNNING_VERSION
845              Defined  by  dpkg  on  the  maintainer script environment to the
846              version of the  currently  running  dpkg  instance  (since  dpkg
847              1.14.17).
848
849       DPKG_MAINTSCRIPT_PACKAGE
850              Defined  by  dpkg  on  the  maintainer script environment to the
851              (non-arch-qualified) package  name  being  handled  (since  dpkg
852              1.14.17).
853
854       DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT
855              Defined  by  dpkg  on  the  maintainer script environment to the
856              package reference count, i.e. the number  of  package  instances
857              with a state greater than not-installed (since dpkg 1.17.2).
858
859       DPKG_MAINTSCRIPT_ARCH
860              Defined  by  dpkg  on  the  maintainer script environment to the
861              architecture the package got built for (since dpkg 1.15.4).
862
863       DPKG_MAINTSCRIPT_NAME
864              Defined by dpkg on the maintainer script environment to the name
865              of the script running, one of preinst, postinst, prerm or postrm
866              (since dpkg 1.15.7).
867
868       DPKG_MAINTSCRIPT_DEBUG
869              Defined by dpkg on the maintainer script environment to a  value
870              (‘0’  or  ‘1’) noting whether debugging has been requested (with
871              the --debug option)  for  the  maintainer  scripts  (since  dpkg
872              1.18.4).
873

FILES

875       /etc/dpkg/dpkg.cfg.d/[0-9a-zA-Z_-]*
876              Configuration fragment files (since dpkg 1.15.4).
877
878       /etc/dpkg/dpkg.cfg
879              Configuration file with default options.
880
881       /var/log/dpkg.log
882              Default log file (see /etc/dpkg/dpkg.cfg and option --log).
883
884       The  other  files  listed  below  are in their default directories, see
885       option --admindir to see how to change locations of these files.
886
887       /var/lib/dpkg/available
888              List of available packages.
889
890       /var/lib/dpkg/status
891              Statuses of available packages. This file  contains  information
892              about  whether  a package is marked for removing or not, whether
893              it is installed or  not,  etc.  See  section  INFORMATION  ABOUT
894              PACKAGES for more info.
895
896              The  status  file  is backed up daily in /var/backups. It can be
897              useful if it's lost or corrupted due to filesystems troubles.
898
899       The format and contents of a binary package are described in deb(5).
900

BUGS

902       --no-act usually gives less information than might be helpful.
903

EXAMPLES

905       To list installed packages related  to  the  editor  vi(1)  (note  that
906       dpkg-query does not load the available file anymore by default, and the
907       dpkg-query --load-avail option should be used instead for that):
908            dpkg -l '*vi*'
909
910       To see the entries in /var/lib/dpkg/available of two packages:
911            dpkg --print-avail elvis vim | less
912
913       To search the listing of packages yourself:
914            less /var/lib/dpkg/available
915
916       To remove an installed elvis package:
917            dpkg -r elvis
918
919       To install a package, you first need to find it in an archive or CDROM.
920       The available file shows that the vim package is in section editors:
921            cd /media/cdrom/pool/main/v/vim
922            dpkg -i vim_4.5-3.deb
923
924       To make a local copy of the package selection states:
925            dpkg --get-selections >myselections
926
927       You  might  transfer  this  file  to another computer, and after having
928       updated the available file there with your package manager frontend  of
929       choice  (see  https://wiki.debian.org/Teams/Dpkg/FAQ for more details),
930       for example:
931            apt-cache dumpavail | dpkg --merge-avail
932       or with dpkg 1.17.6 and earlier:
933            avail=`mktemp`
934            apt-cache dumpavail >"$avail"
935            dpkg --merge-avail "$avail"
936            rm "$avail"
937       you can install it with:
938            dpkg --clear-selections
939            dpkg --set-selections <myselections
940
941       Note that this will not actually install or remove anything,  but  just
942       set  the  selection state on the requested packages. You will need some
943       other application  to  actually  download  and  install  the  requested
944       packages. For example, run apt-get dselect-upgrade.
945
946       Ordinarily,  you  will  find that dselect(1) provides a more convenient
947       way to modify the package selection states.
948

ADDITIONAL FUNCTIONALITY

950       Additional functionality  can  be  gained  by  installing  any  of  the
951       following packages: apt, aptitude and debsums.
952

SEE ALSO

954       aptitude(1), apt(1), dselect(1), dpkg-deb(1), dpkg-query(1), deb(5),
955       deb-control(5), dpkg.cfg(5), and dpkg-reconfigure(8).
956

AUTHORS

958       See /usr/share/doc/dpkg/THANKS for the list of people who have
959       contributed to dpkg.
960
961
962
9631.18.25                           2018-06-26                           dpkg(1)
Impressum