Dependency problem while removing oibaf and paulo dias repositories
A few weeks ago, I had similar problems with oibaf ppa. Even when ppa-purge
fails, you can revert back to official Ubuntu repo version. Especially because the dependencies of these packages aren't huge.
So, I suggest just noting the package names from the output shown, and use apt policy package-name
command to list version from respective repository. For example, apt policy libgl1-mesa-dev
may return like this
apt policy libgl1-mesa-dev
libgl1-mesa-dev:
Installed: 1:17.2~git170422012800.d682f8a~z~padoka0
Candidate: 1:17.2~git170422012800.d682f8a~z~padoka0
Version table:
*** 1:17.2~git170422012800.d682f8a~z~padoka0 100
100 /var/lib/dpkg/status
17.2~git1704230730.070072~gd~z 500
500 ppa.launchpad.net/oibaf/… zesty/main amd64 Packages
17.0.3-1ubuntu1 500
500 hr.archive.ubuntu.com/ubuntu zesty/main amd64 Packages
You can see that the latest version from official repository is 17.0.3-1ubuntu1
. Note this version. Do this for all of the offending packages.
Once you've gathered all package names with official latest version, you can use this type of command sudo apt install libgl1-mesa-dev=version
for all packages. It'll force apt
to install the packages you mentioned the version.
For more package appears to say the same thing include those packages too.
After that and with some luck, you should be on last official repository. Then use ppa-purge
to gracefully purge the both ppas.
We've discussed the issue on chat and it appears this command worked.
sudo apt-get install libgl1-mesa-glx=17.0.3-1ubuntu1 libgl1-mesa-dev=17.0.3-1ubuntu1 libgl1-mesa-glx:i386=17.0.3-1ubuntu1 libglapi-mesa=17.0.3-1ubuntu1 mesa-common-dev=17.0* libglapi-mesa:i386=17.0* libglapi-mesa=17.0* libglapi-mesa=17.0* libgles2-mesa=17.0*
Advice I'd advice to always have aptitude
installed. If it's installed, ppa-purge
may work more appropriately.
Thanks Ravexina was trying to help before i joined the chat room. So, thanks to him especially for working on various other tricks.
Another trick discovered recently
I recently discovered a more convenient way to downgrade/escape from dependency hell without specifying the version. I'm listing the steps
You'd remove the ppa and identify the packages that are creating the dependency problem from that ppa. Those are usually the packages you'll find in following style of messages
libgl1-mesa-dev : Depends: libgl1-mesa-glx (= 1:17.2~git170422012800.d682f8a~z~padoka0) but 17.2~git1704220730.d682f8~gd~z is installed
You know that the package is libgl1-mesa-glx
which is higher than the package apt
find to match with requeste libgl1-mesa-dev
, creating a problem.
Once you identify the problematic packages from that ppa, you'll use this apt to install package from other repo without using release name instead of the version string like this (for 16.04, the release name is xenial
)
sudo apt install libgl1-mesa-dev/xenial
This will select a version from a repository having the archive name xenial
(Note that, all ppa have this xenial
as archive name). Since the installed package are not from xenial
archive (It was, but after removal of the ppa, it's from unknown release for apt), apt
will select a version that comes with same release. Most of the time, it's the official repository comes with Ubuntu (unless you have that package from other ppa or repo).
Surprisingly, apt
act more intelligently this case. Instead of selecting the most highest version for dependency of libgl1-mesa-dev
, it will select highest version from specified release which will be from official repo, even if that needs downgrading of other installed packages, which effectively resolves the problem!