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       unknown
82              The package selection is unknown.  A package that is also  in  a
83              not-installed  state,  and  with an ok flag will be forgotten in
84              the next database store.
85
86   Package flags
87       ok     A package marked ok is in a known state, but might need  further
88              processing.
89
90       reinstreq
91              A    package   marked   reinstreq   is   broken   and   requires
92              reinstallation. These packages cannot be removed, unless  forced
93              with option --force-remove-reinstreq.
94

ACTIONS

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

OPTIONS

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

EXIT STATUS

806       0      The requested action was successfully performed.  Or a check  or
807              assertion command returned true.
808
809       1      A check or assertion command returned false.
810
811       2      Fatal  or unrecoverable error due to invalid command-line usage,
812              or interactions  with  the  system,  such  as  accesses  to  the
813              database, memory allocations, etc.
814

ENVIRONMENT

816   External environment
817       PATH   This  variable  is expected to be defined in the environment and
818              point to the system paths where several required programs are to
819              be  found.  If  it's not set or the programs are not found, dpkg
820              will abort.
821
822       HOME   If set, dpkg will use it as the directory from which to read the
823              user specific configuration file.
824
825       TMPDIR If  set,  dpkg  will  use it as the directory in which to create
826              temporary files and directories.
827
828       SHELL  The program dpkg will execute when starting  a  new  interactive
829              shell, or when spawning a command via a shell.
830
831       PAGER
832       DPKG_PAGER
833              The  program dpkg will execute when running a pager, for example
834              when displaying the conffile differences.  If SHELL is not  set,
835              «sh»  will  be used instead.  The DPKG_PAGER overrides the PAGER
836              environment variable (since dpkg 1.19.2).
837
838       DPKG_COLORS
839              Sets the color mode (since dpkg 1.18.5).  The currently accepted
840              values are: auto (default), always and never.
841
842       DPKG_FORCE
843              Sets the force flags (since dpkg 1.19.5).  When this variable is
844              present, no built-in force defaults will  be  applied.   If  the
845              variable is present but empty, all force flags will be disabled.
846
847       DPKG_FRONTEND_LOCKED
848              Set  by a package manager frontend to notify dpkg that it should
849              not acquire the frontend lock (since dpkg 1.19.1).
850
851   Internal environment
852       LESS   Defined by dpkg to “-FRSXMQ”, if not already set, when  spawning
853              a  pager  (since  dpkg 1.19.2).  To change the default behavior,
854              this variable can be preset to some  other  value  including  an
855              empty string, or the PAGER or DPKG_PAGER variables can be set to
856              disable specific options with «-+», for example DPKG_PAGER="less
857              -+F".
858
859       DPKG_ROOT
860              Defined by dpkg on the maintainer script environment to indicate
861              which installation to act on (since dpkg 1.18.5).  The value  is
862              intended  to be prepended to any path maintainer scripts operate
863              on.  During normal operation,  this  variable  is  empty.   When
864              installing  packages  into  a  different  instdir, dpkg normally
865              invokes maintainer  scripts  using  chroot(2)  and  leaves  this
866              variable  empty,  but  if --force-script-chrootless is specified
867              then the chroot(2) call is skipped and instdir is non-empty.
868
869       DPKG_ADMINDIR
870              Defined by dpkg on the maintainer script environment to indicate
871              the  dpkg  administrative  directory to use (since dpkg 1.16.0).
872              This variable is always set to the current --admindir value.
873
874       DPKG_FORCE
875              Defined by dpkg on  the  subprocesses  environment  to  all  the
876              currently  enabled force option names separated by commas (since
877              dpkg 1.19.5).
878
879       DPKG_SHELL_REASON
880              Defined by dpkg on the shell spawned on the conffile  prompt  to
881              examine the situation (since dpkg 1.15.6).  Current valid value:
882              conffile-prompt.
883
884       DPKG_CONFFILE_OLD
885              Defined by dpkg on the shell spawned on the conffile  prompt  to
886              examine the situation (since dpkg 1.15.6).  Contains the path to
887              the old conffile.
888
889       DPKG_CONFFILE_NEW
890              Defined by dpkg on the shell spawned on the conffile  prompt  to
891              examine the situation (since dpkg 1.15.6).  Contains the path to
892              the new conffile.
893
894       DPKG_HOOK_ACTION
895              Defined by dpkg on the  shell  spawned  when  executing  a  hook
896              action (since dpkg 1.15.4).  Contains the current dpkg action.
897
898       DPKG_RUNNING_VERSION
899              Defined  by  dpkg  on  the  maintainer script environment to the
900              version of the  currently  running  dpkg  instance  (since  dpkg
901              1.14.17).
902
903       DPKG_MAINTSCRIPT_PACKAGE
904              Defined  by  dpkg  on  the  maintainer script environment to the
905              (non-arch-qualified) package  name  being  handled  (since  dpkg
906              1.14.17).
907
908       DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT
909              Defined  by  dpkg  on  the  maintainer script environment to the
910              package reference count, i.e. the number  of  package  instances
911              with a state greater than not-installed (since dpkg 1.17.2).
912
913       DPKG_MAINTSCRIPT_ARCH
914              Defined  by  dpkg  on  the  maintainer script environment to the
915              architecture the package got built for (since dpkg 1.15.4).
916
917       DPKG_MAINTSCRIPT_NAME
918              Defined by dpkg on the maintainer script environment to the name
919              of the script running, one of preinst, postinst, prerm or postrm
920              (since dpkg 1.15.7).
921
922       DPKG_MAINTSCRIPT_DEBUG
923              Defined by dpkg on the maintainer script environment to a  value
924              (‘0’  or  ‘1’) noting whether debugging has been requested (with
925              the --debug option)  for  the  maintainer  scripts  (since  dpkg
926              1.18.4).
927

FILES

929       /etc/dpkg/dpkg.cfg.d/[0-9a-zA-Z_-]*
930              Configuration fragment files (since dpkg 1.15.4).
931
932       /etc/dpkg/dpkg.cfg
933              Configuration file with default options.
934
935       /var/log/dpkg.log
936              Default log file (see /etc/dpkg/dpkg.cfg and option --log).
937
938       The  other  files  listed  below  are in their default directories, see
939       option --admindir to see how to change locations of these files.
940
941       /var/lib/dpkg/available
942              List of available packages.
943
944       /var/lib/dpkg/status
945              Statuses of available packages. This file  contains  information
946              about  whether  a package is marked for removing or not, whether
947              it is installed or  not,  etc.  See  section  INFORMATION  ABOUT
948              PACKAGES for more info.
949
950              The  status  file  is backed up daily in /var/backups. It can be
951              useful if it's lost or corrupted due to filesystems troubles.
952
953       The format and contents of a binary package are described in deb(5).
954

BUGS

956       --no-act usually gives less information than might be helpful.
957

EXAMPLES

959       To list installed packages related  to  the  editor  vi(1)  (note  that
960       dpkg-query does not load the available file anymore by default, and the
961       dpkg-query --load-avail option should be used instead for that):
962            dpkg -l '*vi*'
963
964       To see the entries in /var/lib/dpkg/available of two packages:
965            dpkg --print-avail elvis vim | less
966
967       To search the listing of packages yourself:
968            less /var/lib/dpkg/available
969
970       To remove an installed elvis package:
971            dpkg -r elvis
972
973       To install a package, you first need to find it in an archive or CDROM.
974       The available file shows that the vim package is in section editors:
975            cd /media/cdrom/pool/main/v/vim
976            dpkg -i vim_4.5-3.deb
977
978       To make a local copy of the package selection states:
979            dpkg --get-selections >myselections
980
981       You  might  transfer  this  file  to another computer, and after having
982       updated the available file there with your package manager frontend  of
983       choice  (see  https://wiki.debian.org/Teams/Dpkg/FAQ for more details),
984       for example:
985            apt-cache dumpavail | dpkg --merge-avail
986       or with dpkg 1.17.6 and earlier:
987            avail=`mktemp`
988            apt-cache dumpavail >"$avail"
989            dpkg --merge-avail "$avail"
990            rm "$avail"
991       you can install it with:
992            dpkg --clear-selections
993            dpkg --set-selections <myselections
994
995       Note that this will not actually install or remove anything,  but  just
996       set  the  selection state on the requested packages. You will need some
997       other application  to  actually  download  and  install  the  requested
998       packages. For example, run apt-get dselect-upgrade.
999
1000       Ordinarily,  you  will  find that dselect(1) provides a more convenient
1001       way to modify the package selection states.
1002

ADDITIONAL FUNCTIONALITY

1004       Additional functionality  can  be  gained  by  installing  any  of  the
1005       following packages: apt, aptitude and debsums.
1006

SEE ALSO

1008       aptitude(1), apt(1), dselect(1), dpkg-deb(1), dpkg-query(1), deb(5),
1009       deb-control(5), dpkg.cfg(5), and dpkg-reconfigure(8).
1010

AUTHORS

1012       See /usr/share/doc/dpkg/THANKS for the list of people who have
1013       contributed to dpkg.
1014
1015
1016
10171.19.7                            2019-06-03                           dpkg(1)
Impressum