All options can be specified both on the command line and in the
dpkg
configuration file /usr/local/etc/dpkg/dpkg.cfg or fragment
files (with names matching this shell pattern '[0-9a-zA-Z_-]*')
on the configuration directory /usr/local/etc/dpkg/dpkg.cfg.d/.
Each line in the configuration file is either an option (exactly
the same as the command line option but without leading hyphens)
or a comment (if it starts with a '#
').
--abort-after=
number
Change after how many errors dpkg
will abort. The default
is 50.
-B
, --auto-deconfigure
When a package is removed, there is a possibility that
another installed package depended on the removed package.
Specifying this option will cause automatic
deconfiguration of the package which depended on the
removed package.
-D
octal, --debug=
octal
Switch debugging on. octal is formed by bitwise-oring
desired values together from the list below (note that
these values may change in future releases). -Dh
or
--debug=help
display these debugging values.
Number Description
1 Generally helpful progress information
2 Invocation and status of maintainer scripts
10 Output for each file processed
100 Lots of output for each file processed
20 Output for each configuration file
200 Lots of output for each configuration file
40 Dependencies and conflicts
400 Lots of dependencies/conflicts output
10000 Trigger activation and processing
20000 Lots of output regarding triggers
40000 Silly amounts of output regarding triggers
1000 Lots of drivel about e.g. the dpkg/info dir
2000 Insane amounts of drivel
--force-
things
--no-force-
things, --refuse-
things
Force or refuse (no-force
and refuse
mean the same thing)
to do some things. things is a comma separated list of
things specified below. --force-help
displays a message
describing them. Things marked with (*) are forced by
default.
Warning: These options are mostly intended to be used by
experts only. Using them without fully understanding their
effects may break your whole system.
all
: Turns on (or off) all force options.
downgrade
(*): Install a package, even if newer version of
it is already installed.
Warning: At present dpkg
does not do any dependency
checking on downgrades and therefore will not warn you if
the downgrade breaks the dependency of some other package.
This can have serious side effects, downgrading essential
system components can even make your whole system
unusable. Use with care.
configure-any
: Configure also any unpacked but
unconfigured packages on which the current package
depends.
hold
: Process packages even when marked 'hold'.
remove-reinstreq
: Remove a package, even if it's broken
and marked to require reinstallation. This may, for
example, cause parts of the package to remain on the
system, which will then be forgotten by dpkg
.
remove-essential
: Remove, even if the package is
considered essential. Essential packages contain mostly
very basic Unix commands. Removing them might cause the
whole system to stop working, so use with caution.
depends
: Turn all dependency problems into warnings. This
affects the Pre-Depends
and Depends
fields.
depends-version
: Don't care about versions when checking
dependencies. This affects the Pre-Depends
and Depends
fields.
breaks
: Install, even if this would break another package
(since dpkg 1.14.6). This affects the Breaks
field.
conflicts
: Install, even if it conflicts with another
package. This is dangerous, for it will usually cause
overwriting of some files. This affects the Conflicts
field.
confmiss
: Always install the missing conffile without
prompting. This is dangerous, since it means not
preserving a change (removing) made to the file.
confnew
: If a conffile has been modified and the version
in the package did change, always install the new version
without prompting, unless the --force-confdef
is also
specified, in which case the default action is preferred.
confold
: If a conffile has been modified and the version
in the package did change, always keep the old version
without prompting, unless the --force-confdef
is also
specified, in which case the default action is preferred.
confdef
: If a conffile has been modified and the version
in the package did change, always choose the default
action without prompting. If there is no default action it
will stop to ask the user unless --force-confnew
or
--force-confold
is also been given, in which case it will
use that to decide the final action.
confask
: If a conffile has been modified always offer to
replace it with the version in the package, even if the
version in the package did not change (since dpkg 1.15.8).
If any of --force-confnew
, --force-confold
, or
--force-confdef
is also given, it will be used to decide
the final action.
overwrite
: Overwrite one package's file with another's
file.
overwrite-dir
: Overwrite one package's directory with
another's file.
overwrite-diverted
: Overwrite a diverted file with an
undiverted version.
statoverride-add
: Overwrite an existing stat override when
adding it (since dpkg 1.19.5).
statoverride-remove
: Ignore a missing stat override when
removing it (since dpkg 1.19.5).
security-mac
(*): Use platform-specific Mandatory Access
Controls (MAC) based security when installing files into
the filesystem (since dpkg 1.19.5). On Linux systems the
implementation uses SELinux.
unsafe-io
: Do not perform safe I/O operations when
unpacking (since dpkg 1.15.8.6). Currently this implies
not performing file system syncs before file renames,
which is known to cause substantial performance
degradation on some file systems, unfortunately the ones
that require the safe I/O on the first place due to their
unreliable behaviour causing zero-length files on abrupt
system crashes.
Note: For ext4, the main offender, consider using instead
the mount option nodelalloc
, which will fix both the
performance degradation and the data safety issues, the
latter by making the file system not produce zero-length
files on abrupt system crashes with any software not doing
syncs before atomic renames.
Warning: Using this option might improve performance at
the cost of losing data, use with care.
script-chrootless
: Run maintainer scripts without
chroot(2)ing into instdir
even if the package does not
support this mode of operation (since dpkg 1.18.5).
Warning: This can destroy your host system, use with
extreme care.
architecture
: Process even packages with wrong or no
architecture.
bad-version
: Process even packages with wrong versions
(since dpkg 1.16.1).
bad-path
: PATH
is missing important programs, so problems
are likely.
not-root
: Try to (de)install things even when not root.
bad-verify
: Install a package even if it fails
authenticity check.
--ignore-depends
=package,...
Ignore dependency-checking for specified packages
(actually, checking is performed, but only warnings about
conflicts are given, nothing else). This affects the
Pre-Depends
, Depends
and Breaks
fields.
--no-act
, --dry-run
, --simulate
Do everything which is supposed to be done, but don't
write any changes. This is used to see what would happen
with the specified action, without actually modifying
anything.
Be sure to give --no-act
before the action-parameter, or
you might end up with undesirable results. (e.g. dpkg
--purge foo --no-act
will first purge package foo and then
try to purge package --no-act, even though you probably
expected it to actually do nothing)
-R
, --recursive
Recursively handle all regular files matching pattern
*.deb
found at specified directories and all of its
subdirectories. This can be used with -i
, -A
, --install
,
--unpack
and --record-avail
actions.
-G
Don't install a package if a newer version of the same
package is already installed. This is an alias of
--refuse-downgrade
.
--admindir=
dir
Set the administrative directory to directory. This
directory contains many files that give information about
status of installed or uninstalled packages, etc.
Defaults to «/usr/local/var/lib/dpkg».
--instdir=
dir
Set the installation directory, which refers to the
directory where packages are to be installed. instdir
is
also the directory passed to chroot(2) before running
package's installation scripts, which means that the
scripts see instdir
as a root directory. Defaults to «/».
--root=
dir
Set the root directory to directory
, which sets the
installation directory to «dir» and the administrative
directory to «dir/usr/local/var/lib/dpkg
».
-O
, --selected-only
Only process the packages that are selected for
installation. The actual marking is done with dselect
or
by dpkg
, when it handles packages. For example, when a
package is removed, it will be marked selected for
deinstallation.
-E
, --skip-same-version
Don't install the package if the same version of the
package is already installed.
--pre-invoke=
command
--post-invoke=
command
Set an invoke hook command to be run via 'sh -c' before or
after the dpkg
run for the unpack, configure, install,
triggers-only, remove, purge, add-architecture and
remove-architecture dpkg
actions (since dpkg 1.15.4;
add-architecture and remove-architecture actions since
dpkg 1.17.19). This option can be specified multiple
times. The order the options are specified is preserved,
with the ones from the configuration files taking
precedence. The environment variable DPKG_HOOK_ACTION
is
set for the hooks to the current dpkg
action. Note: front-
ends might call dpkg
several times per invocation, which
might run the hooks more times than expected.
--path-exclude=
glob-pattern
--path-include=
glob-pattern
Set glob-pattern as a path filter, either by excluding or
re-including previously excluded paths matching the
specified patterns during install (since dpkg 1.15.8).
Warning: take into account that depending on the excluded
paths you might completely break your system, use with
caution.
The glob patterns use the same wildcards used in the
shell, were '*' matches any sequence of characters,
including the empty string and also '/'. For example,
«/usr/*/READ*» matches «/usr/share/doc/package/README».
As usual, '?' matches any single character (again,
including '/'). And '[' starts a character class, which
can contain a list of characters, ranges and
complementations. See glob(7) for detailed information
about globbing. Note: the current implementation might re-
include more directories and symlinks than needed, to be
on the safe side and avoid possible unpack failures;
future work might fix this.
This can be used to remove all paths except some
particular ones; a typical case is:
--path-exclude=/usr/share/doc/*
--path-include=/usr/share/doc/*/copyright
to remove all documentation files except the copyright
files.
These two options can be specified multiple times, and
interleaved with each other. Both are processed in the
given order, with the last rule that matches a file name
making the decision.
The filters are applied when unpacking the binary
packages, and as such only have knowledge of the type of
object currently being filtered (e.g. a normal file or a
directory) and have not visibility of what objects will
come next. Because these filters have side effects (in
contrast to find(1) filters), excluding an exact pathname
that happens to be a directory object like /usr/share/doc
will not have the desired result, and only that pathname
will be excluded (which could be automatically reincluded
if the code sees the need). Any subsequent files
contained within that directory will fail to unpack.
Hint: make sure the globs are not expanded by your shell.
--verify-format
format-name
Sets the output format for the --verify
command (since
dpkg 1.17.2).
The only currently supported output format is rpm
, which
consists of a line for every path that failed any check.
The lines start with 9 characters to report each specific
check result, a '?
' implies the check could not be done
(lack of support, file permissions, etc), '.
' implies the
check passed, and an alphanumeric character implies a
specific check failed; the md5sum verification failure
(the file contents have changed) is denoted with a '5
' on
the third character. The line is followed by a space and
an attribute character (currently 'c
' for conffiles),
another space and the pathname.
--status-fd
n
Send machine-readable package status and progress
information to file descriptor n. This option can be
specified multiple times. The information is generally one
record per line, in one of the following forms:
status:
package:
status
Package status changed; status is as in the status
file.
status:
package : error :
extended-error-message
An error occurred. Any possible newlines in
extended-error-message will be converted to spaces
before output.
status:
file : conffile-prompt : '
real-old' '
real-new'
useredited distedited
User is being asked a conffile question.
processing:
stage:
package
Sent just before a processing stage starts. stage
is one of upgrade
, install
(both sent before
unpacking), configure
, trigproc
, disappear
, remove
,
purge
.
--status-logger
=command
Send machine-readable package status and progress
information to the shell command's standard input, to be
run via 'sh -c' (since dpkg 1.16.0). This option can be
specified multiple times. The output format used is the
same as in --status-fd
.
--log=
filename
Log status change updates and actions to filename, instead
of the default /usr/local/var/log/dpkg.log. If this option
is given multiple times, the last filename is used. Log
messages are of the form:
YYYY-MM-DD HH:MM:SS startup
type command
For each dpkg invocation where type is archives
(with a command of unpack
or install
) or packages
(with a command of configure
, triggers-only
, remove
or purge
).
YYYY-MM-DD HH:MM:SS status
state pkg installed-version
For status change updates.
YYYY-MM-DD HH:MM:SS action pkg installed-version
available-version
For actions where action is one of install
,
upgrade
, configure
, trigproc
, disappear
, remove
or
purge
.
YYYY-MM-DD HH:MM:SS conffile
filename decision
For conffile changes where decision is either
install
or keep
.
--no-pager
Disables the use of any pager when showing information
(since dpkg 1.19.2).
--no-debsig
Do not try to verify package signatures.
--no-triggers
Do not run any triggers in this run (since dpkg 1.14.17),
but activations will still be recorded. If used with
--configure
package or --triggers-only
package then the
named package postinst will still be run even if only a
triggers run is needed. Use of this option may leave
packages in the improper triggers-awaited
and
triggers-pending
states. This can be fixed later by
running: dpkg --configure --pending
.
--triggers
Cancels a previous --no-triggers
(since dpkg 1.14.17).