On an Ubuntu 16.04 (Xenial) system, I have installed a bunch of PPAs which installed packages with versions newer than the default repo packages, in an attempt to obtain some newer features that weren't available in the default repos.
Unfortunately, the system ended up being unstable. I removed all the PPAs, but now I have a whole bunch of packages that are ahead of the versions expected by the default repo packages and thus often incompatible with them.
An example of an error I'm getting with these new packages:
E: Can't find a source to download version '2.40.16-1~ubuntu16.04.1' of 'librsvg2-2:amd64'
E: Internal error: couldn't generate list of packages to download
$ apt policy librsvg2-2:amd64
librsvg2-2:
Installed: 2.40.16-1~ubuntu16.04.1
Candidate: 2.40.16-1~ubuntu16.04.1
Version table:
*** 2.40.16-1~ubuntu16.04.1 100
100 /var/lib/dpkg/status
2.40.13-3 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
I've been re-stabilizing the system by manually identifying and downgrading each of these packages to the repo version. In this case, for example, I'd do:
sudo apt install librsvg2-2:amd64=2.40.13-3
This seems to solve the problem for each individual package, but unfortunately there's a huge number of them so I'l like to find some automated solution that would downgrade them all in a batch.
Is there a way to do that?
The primary way I imagine is to somehow identify all packages that only have /var/lib/dpkg/status
as their source. Of course, if there's any other way I'd be happy to learn it.
I have tried the solution from the suggested existing question and all I get is:
$ sudo apt-get -o Dir::Etc::Preferences=a_p dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
– Dun Peal Feb 17 '19 at 18:37ppa-purge
command? – Kristopher Ives Feb 17 '19 at 18:38ppa-purge
. When you rejected that path, you chose a more difficult path. Use ofdist-upgrade
is not recommended - it will recalculate your system's needs, and might install/uninstall packages that you don't expect. – user535733 Feb 17 '19 at 19:01ppa-purge
path. I wasn't aware of it. At the time I deleted the PPAs from the system, I thought it would be an easy fix. The problems weren't apparent back then. – Dun Peal Feb 17 '19 at 21:43