dpkg-divert

Create and manage a redirect list in Debian Linux

Supplementary instructions

The dpkg-divert command is a tool in Debian Linux that creates and manages a diversion list that invalidates the default location of installation files.

grammar

dpkg-divert(options)(parameters)

Options

--add: Add a transfer file;
--remove: delete a transfer file;
--list: List matching transfers;
--truename: the real file name of the corresponding transferred file;
--quidet: Quiet mode.

Parameters

File: Specify the transfer file name.

Example

When specifying the installation of the software package wibble, write /usr/bin/example.foo instead of /usr/bin/example:

dpkg-divert --package wibble --divert /usr/bin/example.foo --rename /usr/bin/example

When the specified software package wibble is installed, delete the transferred modifications to /usr/bin/example:

dpkg-divert --package wibble --rename --remove /usr/bin/example

Remove transferred modifications to /usr/bin/example:

dpkg-divert --rename --remove /usr/bin/example

When adding a package installation, write /usr/bin/example.foo instead of /usr/bin/example modification:

dpkg-divert --divert /usr/bin/example.foo --rename /usr/bin/example