Set apt-get options to tolerate harmless 'dpkg --force-conflicts' kludge?

Since OP asked for a list of commands (with which to change the relevant metadata of the package) in the comments to Gilles' answer, here it is:

# download .deb
apt download parallel
# alternatively: aptitude download parallel

# unpack
dpkg-deb -R parallel_*.deb tmp/

# make changes to the package metadata
sed -i \
  -e '/^Version:/s/$/~nomoreutconfl/' \
  -e '/^Conflicts: moreutils/d' \
  tmp/DEBIAN/control

# pack anew
dpkg-deb -b tmp parallel_custom.deb

# install
dpkg -i parallel_custom.deb

This is under the assumptions that the conflicts line only has moreutils as an entry (and without version restrictions) as was the case in my installation. Otherwise, use '/^Conflicts:/s/\(, \)\?moreutils\( [^,]\+\)\?//' as the second sed script to only remove the relevant part of the line and support version restrictions.

Your installed package won't be overwritten by newer versions from the repository and you have to manually repeat this procedure for every update to the GNU parallel package if you want to keep this package up-to-date.


A conflict between packages is harmful in and of itself. When you force dpkg to install the conflicting packages, this may not cause any other harm if the conflict was declared for no good reason, but the packages are still conflicting. APT works hard to resolve conflicts when installing packages and it doesn't have a list of conflicts to ignore. You can't solve this by making it pass different options to dpkg: the problem is that the conflicts make APT's own job impossible.

Never install conflicting packages unless it's a temporary state to get out of a situation where APT breaks down. Don't run APT until you've worked with dpkg to get out of the conflicting situation.

If you want to install conflicting packages, modify them first to remove the Conflict: declaration, in addition to resolving whatever problems motivated the conflict declaration.