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

NAME

6       dpkg - package manager for Debian
7

SYNOPSIS

9       dpkg [option...] action
10

WARNING

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

DESCRIPTION

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

INFORMATION ABOUT PACKAGES

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

ACTIONS

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

OPTIONS

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

EXIT STATUS

823       0   The requested action was successfully performed.  Or a check or
824           assertion command returned true.
825
826       1   A check or assertion command returned false.
827
828       2   Fatal or unrecoverable error due to invalid command-line usage, or
829           interactions with the system, such as accesses to the database,
830           memory allocations, etc.
831

ENVIRONMENT

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

FILES

953       /etc/dpkg/dpkg.cfg.d/[0-9a-zA-Z_-]*
954           Configuration fragment files (since dpkg 1.15.4).
955
956       /etc/dpkg/dpkg.cfg
957           Configuration file with default options.
958
959       /var/log/dpkg.log
960           Default log file (see /etc/dpkg/dpkg.cfg and option --log).
961
962       The other files listed below are in their default directories, see
963       option --admindir to see how to change locations of these files.
964
965       /var/lib/dpkg/available
966           List of available packages.
967
968       /var/lib/dpkg/status
969           Statuses of available packages. This file contains information
970           about whether a package is marked for removing or not, whether it
971           is installed or not, etc. See section INFORMATION ABOUT PACKAGES
972           for more info.
973
974           The status file is backed up daily in /var/backups. It can be
975           useful if it's lost or corrupted due to filesystems troubles.
976
977       The format and contents of a binary package are described in deb(5).
978

BUGS

980       --no-act usually gives less information than might be helpful.
981

EXAMPLES

983       To list installed packages related to the editor vi(1) (note that dpkg-
984       query does not load the available file anymore by default, and the
985       dpkg-query --load-avail option should be used instead for that):
986
987        dpkg -l '*vi*'
988
989       To see the entries in /var/lib/dpkg/available of two packages:
990
991        dpkg --print-avail elvis vim | less
992
993       To search the listing of packages yourself:
994
995        less /var/lib/dpkg/available
996
997       To remove an installed elvis package:
998
999        dpkg -r elvis
1000
1001       To install a package, you first need to find it in an archive or CDROM.
1002       The available file shows that the vim package is in section editors:
1003
1004        cd /media/cdrom/pool/main/v/vim
1005        dpkg -i vim_4.5-3.deb
1006
1007       To make a local copy of the package selection states:
1008
1009        dpkg --get-selections> myselections
1010
1011       You might transfer this file to another computer, and after having
1012       updated the available file there with your package manager frontend of
1013       choice (see <https://wiki.debian.org/Teams/Dpkg/FAQ> for more details),
1014       for example:
1015
1016        apt-cache dumpavail | dpkg --merge-avail
1017
1018       or with dpkg 1.17.6 and earlier:
1019
1020        avail=$(mktemp)
1021        apt-cache dumpavail> "$avail"
1022        dpkg --merge-avail "$avail"
1023        rm "$avail"
1024
1025       you can install it with:
1026
1027        dpkg --clear-selections
1028        dpkg --set-selections <myselections
1029
1030       Note that this will not actually install or remove anything, but just
1031       set the selection state on the requested packages. You will need some
1032       other application to actually download and install the requested
1033       packages. For example, run apt-get dselect-upgrade.
1034
1035       Ordinarily, you will find that dselect(1) provides a more convenient
1036       way to modify the package selection states.
1037

ADDITIONAL FUNCTIONALITY

1039       Additional functionality can be gained by installing any of the
1040       following packages: apt, aptitude and debsums.
1041

SEE ALSO

1043       aptitude(8), apt(8), dselect(1), dpkg-deb(1), dpkg-query(1), deb(5),
1044       deb-control(5), dpkg.cfg(5), and dpkg-reconfigure(8).
1045

AUTHORS

1047       See /usr/share/doc/dpkg/THANKS for the list of people who have
1048       contributed to dpkg.
1049
1050
1051
10521.20.9                            2021-04-13                           dpkg(1)
Impressum