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

INFORMATION ABOUT PACKAGES

37       dpkg maintains some usable information about available packages. The
38       information is divided in three classes: states, selection states and
39       flags. These values are intended to be changed mainly with dselect.
40
41   Package states
42       not-installed
43           The package is not installed on your system.
44
45       config-files
46           Only the configuration files or the postrm script and the data it
47           needs to remove of the package exist on the system.
48
49       half-installed
50           The installation of the package has been started, but not completed
51           for some reason.
52
53       unpacked
54           The package is unpacked, but not configured.
55
56       half-configured
57           The package is unpacked and configuration has been started, but not
58           yet completed for some reason.
59
60       triggers-awaited
61           The package awaits trigger processing by another package.
62
63       triggers-pending
64           The package has been triggered.
65
66       installed
67           The package is correctly unpacked and configured.
68
69   Package selection states
70       install
71           The package is selected for installation.
72
73       hold
74           A package marked to be on hold is kept on the same version, that
75           is, no automatic new installs, upgrades or removals will be
76           performed on them, unless these actions are requested explicitly,
77           or are permitted to be done automatically with the --force-hold
78           option.
79
80       deinstall
81           The package is selected for deinstallation (i.e. we want to remove
82           all files, except configuration files).
83
84       purge
85           The package is selected to be purged (i.e. we want to remove
86           everything from system directories, even configuration files).
87
88       unknown
89           The package selection is unknown.  A package that is also in a not-
90           installed state, and with an ok flag will be forgotten in the next
91           database store.
92
93   Package flags
94       ok  A package marked ok is in a known state, but might need further
95           processing.
96
97       reinstreq
98           A package marked reinstreq is broken and requires reinstallation.
99           These packages cannot be removed, unless forced with option
100           --force-remove-reinstreq.
101

ACTIONS

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

OPTIONS

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

EXIT STATUS

886       0   The requested action was successfully performed.  Or a check or
887           assertion command returned true.
888
889       1   A check or assertion command returned false.
890
891       2   Fatal or unrecoverable error due to invalid command-line usage, or
892           interactions with the system, such as accesses to the database,
893           memory allocations, etc.
894

ENVIRONMENT

896   External environment
897       PATH
898           This variable is expected to be defined in the environment and
899           point to the system paths where several required programs are to be
900           found. If it's not set or the programs are not found, dpkg will
901           abort.
902
903       HOME
904           If set, dpkg will use it as the directory from which to read the
905           user specific configuration file.
906
907       TMPDIR
908           If set, dpkg will use it as the directory in which to create
909           temporary files and directories.
910
911       SHELL
912           The program dpkg will execute when starting a new interactive
913           shell, or when spawning a command via a shell.
914
915       PAGER
916       DPKG_PAGER
917           The program dpkg will execute when running a pager, which will be
918           executed with «$SHELL -c», for example when displaying the conffile
919           differences.  If SHELL is not set, «sh» will be used instead.  The
920           DPKG_PAGER overrides the PAGER environment variable (since dpkg
921           1.19.2).
922
923       DPKG_COLORS
924           Sets the color mode (since dpkg 1.18.5).  The currently accepted
925           values are: auto (default), always and never.
926
927       DPKG_FORCE
928           Sets the force flags (since dpkg 1.19.5).  When this variable is
929           present, no built-in force defaults will be applied.  If the
930           variable is present but empty, all force flags will be disabled.
931
932       DPKG_ADMINDIR
933           If set and the --admindir or --root options have not been
934           specified, it will be used as the dpkg administrative directory
935           (since dpkg 1.20.0).
936
937       DPKG_FRONTEND_LOCKED
938           Set by a package manager frontend to notify dpkg that it should not
939           acquire the frontend lock (since dpkg 1.19.1).
940
941   Internal environment
942       LESS
943           Defined by dpkg to “-FRSXMQ”, if not already set, when spawning a
944           pager (since dpkg 1.19.2).  To change the default behavior, this
945           variable can be preset to some other value including an empty
946           string, or the PAGER or DPKG_PAGER variables can be set to disable
947           specific options with «-+», for example DPKG_PAGER="less -+F".
948
949       DPKG_ROOT
950           Defined by dpkg on the maintainer script environment to indicate
951           which installation to act on (since dpkg 1.18.5).  The value is
952           intended to be prepended to any path maintainer scripts operate on.
953           During normal operation, this variable is empty.  When installing
954           packages into a different instdir, dpkg normally invokes maintainer
955           scripts using chroot(2) and leaves this variable empty, but if
956           --force-script-chrootless is specified then the chroot(2) call is
957           skipped and instdir is non-empty.
958
959       DPKG_ADMINDIR
960           Defined by dpkg on the maintainer script environment to indicate
961           the dpkg administrative directory to use (since dpkg 1.16.0).  This
962           variable is always set to the current --admindir value.
963
964       DPKG_FORCE
965           Defined by dpkg on the subprocesses environment to all the
966           currently enabled force option names separated by commas (since
967           dpkg 1.19.5).
968
969       DPKG_SHELL_REASON
970           Defined by dpkg on the shell spawned on the conffile prompt to
971           examine the situation (since dpkg 1.15.6).  Current valid value:
972           conffile-prompt.
973
974       DPKG_CONFFILE_OLD
975           Defined by dpkg on the shell spawned on the conffile prompt to
976           examine the situation (since dpkg 1.15.6).  Contains the path to
977           the old conffile.
978
979       DPKG_CONFFILE_NEW
980           Defined by dpkg on the shell spawned on the conffile prompt to
981           examine the situation (since dpkg 1.15.6).  Contains the path to
982           the new conffile.
983
984       DPKG_HOOK_ACTION
985           Defined by dpkg on the shell spawned when executing a hook action
986           (since dpkg 1.15.4).  Contains the current dpkg action.
987
988       DPKG_RUNNING_VERSION
989           Defined by dpkg on the maintainer script environment to the version
990           of the currently running dpkg instance (since dpkg 1.14.17).
991
992       DPKG_MAINTSCRIPT_PACKAGE
993           Defined by dpkg on the maintainer script environment to the (non-
994           arch-qualified) package name being handled (since dpkg 1.14.17).
995
996       DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT
997           Defined by dpkg on the maintainer script environment to the package
998           reference count, i.e. the number of package instances with a state
999           greater than not-installed (since dpkg 1.17.2).
1000
1001       DPKG_MAINTSCRIPT_ARCH
1002           Defined by dpkg on the maintainer script environment to the
1003           architecture the package got built for (since dpkg 1.15.4).
1004
1005       DPKG_MAINTSCRIPT_NAME
1006           Defined by dpkg on the maintainer script environment to the name of
1007           the script running, one of preinst, postinst, prerm or postrm
1008           (since dpkg 1.15.7).
1009
1010       DPKG_MAINTSCRIPT_DEBUG
1011           Defined by dpkg on the maintainer script environment to a value
1012           (‘0’ or ‘1’) noting whether debugging has been requested (with the
1013           --debug option) for the maintainer scripts (since dpkg 1.18.4).
1014

FILES

1016       /etc/dpkg/dpkg.cfg.d/[0-9a-zA-Z_-]*
1017           Configuration fragment files (since dpkg 1.15.4).
1018
1019       /etc/dpkg/dpkg.cfg
1020           Configuration file with default options.
1021
1022       /var/log/dpkg.log
1023           Default log file (see /etc/dpkg/dpkg.cfg and option --log).
1024
1025       The other files listed below are in their default directories, see
1026       option --admindir to see how to change locations of these files.
1027
1028       /var/lib/dpkg/available
1029           List of available packages.
1030
1031       /var/lib/dpkg/status
1032           Statuses of available packages. This file contains information
1033           about whether a package is marked for removing or not, whether it
1034           is installed or not, etc. See section INFORMATION ABOUT PACKAGES
1035           for more info.
1036
1037           The status file is backed up daily in /var/backups. It can be
1038           useful if it's lost or corrupted due to filesystems troubles.
1039
1040       The format and contents of a binary package are described in deb(5).
1041

BUGS

1043       --no-act usually gives less information than might be helpful.
1044

EXAMPLES

1046       To list installed packages related to the editor vi(1) (note that dpkg-
1047       query does not load the available file anymore by default, and the
1048       dpkg-query --load-avail option should be used instead for that):
1049
1050        dpkg -l '*vi*'
1051
1052       To see the entries in /var/lib/dpkg/available of two packages:
1053
1054        dpkg --print-avail elvis vim | less
1055
1056       To search the listing of packages yourself:
1057
1058        less /var/lib/dpkg/available
1059
1060       To remove an installed elvis package:
1061
1062        dpkg -r elvis
1063
1064       To install a package, you first need to find it in an archive or CDROM.
1065       The available file shows that the vim package is in section editors:
1066
1067        cd /media/cdrom/pool/main/v/vim
1068        dpkg -i vim_4.5-3.deb
1069
1070       To make a local copy of the package selection states:
1071
1072        dpkg --get-selections> myselections
1073
1074       You might transfer this file to another computer, and after having
1075       updated the available file there with your package manager frontend of
1076       choice (see <https://wiki.debian.org/Teams/Dpkg/FAQ#set-selections> for
1077       more details), for example:
1078
1079        apt-cache dumpavail | dpkg --merge-avail
1080
1081       or with dpkg 1.17.6 and earlier:
1082
1083        avail=$(mktemp)
1084        apt-cache dumpavail> "$avail"
1085        dpkg --merge-avail "$avail"
1086        rm "$avail"
1087
1088       you can install it with:
1089
1090        dpkg --clear-selections
1091        dpkg --set-selections <myselections
1092
1093       Note that this will not actually install or remove anything, but just
1094       set the selection state on the requested packages. You will need some
1095       other application to actually download and install the requested
1096       packages. For example, run apt-get dselect-upgrade.
1097
1098       Ordinarily, you will find that dselect(1) provides a more convenient
1099       way to modify the package selection states.
1100

ADDITIONAL FUNCTIONALITY

1102       Additional functionality can be gained by installing any of the
1103       following packages: apt, aptitude and debsums.
1104

SEE ALSO

1106       aptitude(8), apt(8), dselect(1), dpkg-deb(1), dpkg-query(1), deb(5),
1107       deb-control(5), dpkg.cfg(5), and dpkg-reconfigure(8).
1108

AUTHORS

1110       See /usr/share/doc/dpkg/THANKS for the list of people who have
1111       contributed to dpkg.
1112
1113
1114
11151.21.9                            2022-07-01                           dpkg(1)
Impressum