Downgrade a bunch of packages

Solution 1:

A bit late to the party but I found this question when looking for an answer and now I have my own answer to share.

I believe you can do this via the mysterious world of apt_preferences.

Try making a file called /tmp/a_p (or whatever) like so...

Package: *
Pin: release a=*-backports
Pin-Priority: 100

Package: *
Pin: release n=*
Pin-Priority: 1001

Then run:

sudo apt-get -o Dir::Etc::Preferences=/tmp/a_p dist-upgrade

The second section of the file basically does what the OP requested, in that it bumps the priority of all packages in any live repository to make them install even if it means a downgrade.

The first section prevents the second section from triggering the installation of all backports. You may or may not care about or want this. I'd suggest tinkering to see what works. You can use apt-cache -o Dir::Etc::Preferences=/tmp/a_p policy somepkg to see what effect the a_p file is having on specific packages.

TIM

Solution 2:

Ok, what if found is the script ppa-purge

If you added a PPA and upgraded software, you can remove the repo and in this step downgrade all packages that were upgraded with

ppa-purge [repo name]

Is this usefull for another person?

But it is still open if you can install the highest version available even if the installed version is higher...