Thursday, May 9, 2019

Apt Upgrade AND Downgrade all packages to Current Release


I recently upgraded from Ubuntu 12.04 to 14.04. While using 12.04, I installed several packages via PPA's. Now that I've upgraded to 14.04, I've discovered that some of the PPA packages from 12.04 are still installed. All of those PPA repositories were removed during upgrade.


I would like to uninstall the PPA package versions of any package that exists in the Ubuntu repositories. For example, I have a SVN version of Audacity that is newer than the version in the Ubuntu repositories, but I want to replace it with the Ubuntu repository version.


I want to do the same thing with all PPA installed packages. I tried pinning this in /etc/apt/preferences.d/main


Package: *
Pin: release a=trusty
Pin-Priority: 2001
Package: *
Pin: release a=trusty-updates
Pin-Priority: 2002
Package: *
Pin: release a=trusty-security
Pin-Priority: 2003

Then


apt-get update; apt-get upgrade

Unfortunately, it didn't downgrade any packages like I hoped. For example, running apt-cache show catfish shows version 1.0.2-2 is available from the Ubuntu repositories, but I still have 1.0.82-1~precise~ppa1 installed.


I want to Downgrade all packages to their current release in the Ubuntu repositories.



This cannot easily be done in any automated way, especially if you have any PPAs that are giving 404. (which most people do) Also, depending on what packages you have installed, a completely automated downgrade could really screw up your system. Follow these steps to manually find and downgrade packages.



  1. Install Synaptic if you don't already have it

  2. Open Synaptic

  3. Click on the left side where it reads Installed (local or obsolete)

  4. Select a package you wish to downgrade on the right side

  5. From the menu select: Package -> Force Version

  6. Repeat for each package you wish to downgrade


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...