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

EXIT STATUS

892       0   The requested action was successfully performed.  Or a check or
893           assertion command returned true.
894
895       1   A check or assertion command returned false.
896
897       2   Fatal or unrecoverable error due to invalid command-line usage, or
898           interactions with the system, such as accesses to the database,
899           memory allocations, etc.
900

ENVIRONMENT

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

FILES

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

BUGS

1053       --no-act usually gives less information than might be helpful.
1054

EXAMPLES

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

ADDITIONAL FUNCTIONALITY

1112       Additional functionality can be gained by installing any of the
1113       following packages: apt, aptitude and debsums.
1114

SEE ALSO

1116       aptitude(8), apt(8), dselect(1), dpkg-deb(1), dpkg-query(1), deb(5),
1117       deb-control(5), dpkg.cfg(5), and dpkg-reconfigure(8).
1118

AUTHORS

1120       See /usr/share/doc/dpkg/THANKS for the list of people who have
1121       contributed to dpkg.
1122
1123
1124
11251.21.21                           2023-02-25                           dpkg(1)
Impressum