Home

dpkgdivert

dpkg-divert is a tool in the Debian package management system (dpkg) that manages file diversions. It allows packages to install files that would conflict with existing ones by renaming or relocating the existing file and providing a replacement, while preserving the original.

Diversions are tracked by dpkg and stored in /var/lib/dpkg/diversions. Each diversion associates an original path with

Typical usage: To divert a file, you run something like: dpkg-divert --divert /path/to/file.distrib --rename /path/to/file. To

Behavior: The diversion ensures that the original path is not overwritten by another package, preventing conflicts

See also: dpkg, file diversions, manual pages.

a
diverted
path
and
a
package
name,
and
can
be
created
with
options
such
as
--divert,
--rename,
and
--add.
The
--package
option
can
be
used
to
assign
a
package
to
the
diversion.
remove
the
diversion,
you
run:
dpkg-divert
--rename
--remove
/path/to/file.
The
specific
options
may
vary
by
version;
consult
the
manpage.
during
installation,
and
letting
you
restore
the
original
by
removing
the
diversion.
It
is
often
used
when
local
modifications
must
be
preserved
or
when
loading
alternative
implementations.