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