I have two packages that each create /usr/bin/ffprobe. One of them is ffmpeg from the Deb Multimedia repository, while the other is ffmbc 0.7-rc5 built from source. The hand-rolled one is business-critical, and we used to just install it from source wherever it was necessary. I can only assume it would clobber the ffmpeg file, and there were never any ill effects.

In theory, it should be acceptable for our ffmbc package to overwrite the file from the ffmpeg package. The drawback there is that an update to ffmpeg will overwrite the ffmbc binary. Is there any easy way to reconcile this?

3 Answers 3


On Debian based systems there is the DPKG (below apt) can have diversions setup using the command dpkg-divert

dpkg-divert is the utility used to set up and update the list of diversions.

File diversions are a way of forcing dpkg(1) not to install a file into its location, but to a diverted location. ... System administrators can also use it to override some package's configuration file, or whenever some files (which aren't marked as 'conffiles') need to be preserved by dpkg, when installing a newer version of a package which contains those files.

So for your case you might use a command like this to setup a diversions. (I haven't tested, check the man page and verify that this seems right.)

dpkg-divert --local --divert /usr/bin/ffprobe.ffmpeg --rename /usr/bin/ffprobe

Another solution I found was to change how I built the ffmbc package. Generally it's possible to pass an alternate prefix for the purpose of changing the final paths of the installed files:

./configure --prefix=/usr/local

For Debian packages, this goes in the ${package}/debian/rules file as follows:

    ./configure --enable-gpl --prefix=/usr/local

By putting the ffmbc files in /usr/local, I can keep the ffmpeg files in /usr and allow each package to update independently.

  • 3
    Packages should not install anything to /usr/local -- it is a policy violation. The whole point of /usr/local it to keep files under package management and manually installed files apart. See the following FHS related discussion: unix.stackexchange.com/questions/30/…
    – Onlyjob
    Commented Aug 27, 2014 at 0:42

Packages providing same file(s) should conflict with each other -- it they don't it is a bug (please consider reporting such cases). If you build software from sources and install using make install (or similar) make sure it goes to /usr/local to avoid conflicts with package management.

Please note that deb-multimedia.org is deprecated unofficial repository notorious for causing conflicts with official packages.

If software you need is not packaged for Debian then you can submit packaging request RFP but please check for existing requests first.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .