This should provide you with a quick fix. It makes a couple of assumptions such as, that you've attempted to install libjpeg-progs and it's failed. Basically it goes and grabs the package from your cache, extracts out the package, changes the control file to allow it to resolve the conflict and changes the version number (appends this bug report number to it), bundles it back up into a package and then installs the package. It's also untested and assumes you don't have packages in your home folder (libjpeg-progs).
#!/bin/bash mkdir ~/libjpeg-progs cp /var/cache/apt/archives/libjpeg-progs* ~/libjpeg-progs cd ~/libjpeg-progs ar x libjpeg-progs*.deb rm libjpeg-progs*.deb debian-binary tar xvf data.tar.* && rm data.tar.* tar xvf control.tar.* --directory DEBIAN && rm control.tar.* cd DEBIAN if [ -z "$( grep "^Replaces:" control )" ] ; then sed '/^Version:/ iReplaces: libjpeg-turbo-progs' control -i else sed 's/\(^Replaces: .*\)/\1, libjpeg-turbo-progs/' control -i fi sed 's/\(^Version: .*\)/\1-1550124/' control -i cd ~ dpkg -b libjpeg-progs . sudo dpkg -i libjpeg-progs*.deb -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libjpeg8-empty in Ubuntu. https://bugs.launchpad.net/bugs/1550124 Title: package libjpeg-progs 8c-2ubuntu8 failed to install/upgrade: trying to overwrite '/usr/bin/rdjpgcom', which is also in package libjpeg-turbo- progs 1.4.2-0ubuntu1 Status in libjpeg8-empty package in Ubuntu: Confirmed Bug description: update failed with this. ProblemType: Package DistroRelease: Ubuntu 16.04 Package: libjpeg-progs 8c-2ubuntu8 ProcVersionSignature: Ubuntu 4.4.0-2.16-generic 4.4.0 Uname: Linux 4.4.0-2-generic x86_64 NonfreeKernelModules: nvidia ApportVersion: 2.20-0ubuntu3 Architecture: amd64 Date: Mon Feb 22 20:02:43 2016 ErrorMessage: trying to overwrite '/usr/bin/rdjpgcom', which is also in package libjpeg-turbo-progs 1.4.2-0ubuntu1 InstallationDate: Installed on 2012-09-23 (1251 days ago) InstallationMedia: Ubuntu GNOME Remix 12.10 "Quantal Quetzal" - Alpha amd64(20120922) RelatedPackageVersions: dpkg 1.18.4ubuntu1 apt 1.2.3 SourcePackage: libjpeg8-empty Title: package libjpeg-progs 8c-2ubuntu8 failed to install/upgrade: trying to overwrite '/usr/bin/rdjpgcom', which is also in package libjpeg-turbo-progs 1.4.2-0ubuntu1 UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libjpeg8-empty/+bug/1550124/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp