19

When I upgrade from one version of Ubuntu to the next, the upgrade tool rightly disables all my PPAs, so that software compiled for or otherwise tied to the old version of Ubuntu does not interfere with the new version that I just upgraded to.

Is there any way to automatically re-enable and update any PPAs that provide packages for the new version of Ubuntu? For example, suppose I'm currently running Maverick, and I have two PPAs enabled, "foo" and "bar". Suppose that "foo" provides packages for both Maverick and Natty, while "bar" provides packages for Natty only. Is there a tool I could run after updating to Natty that would re-enable my "foo" PPA and update it to point to the Natty packages, while leaving the "bar" PPA disabled?

  • 4
    This is not an answer to your question (I don't know of any such tool), however David Callé has created a small script that shows which versions of Ubuntu are supported by your (enabled) PPAs: ubuntuforums.org/showpost.php?p=9960951 – htorque May 15 '11 at 7:32
29

There is a tool called Y-PPA-Manager that lets you do exactly that.

To try Y-PPA-Manager, you need to run the following commands in a terminal:

sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager

After installing, run the software and click on 'Advanced' button.

enter image description here

After clicking on that button, you would come up with a window similar to the one below. Click on 'Re-enable working PPAs after Ubuntu upgrade'.

enter image description here

You would then be prompted for your password. Enter your password and click OK. After that, you would get a dialog box like this:

enter image description here

Click OK and wait till all the working PPAs are re-enabled. When the entire process is successfully completed, you would be notified.

  • Does it selectively enable only PPAs that actually exist for the upgraded version of Ubuntu? – Ryan C. Thompson Jan 4 '12 at 17:28
  • It will scan for all PPAs that are disabled and re-enable those that only work (meaning those PPAs that exist) for the upgraded version. If it doesn't, then it should be filed as a bug on the software. – jokerdino Jan 5 '12 at 7:04
  • Ok, that sounds like exactly what I asked for. I'll have to try it out next upgrade cycle. – Ryan C. Thompson Jan 5 '12 at 8:29
  • nice program, it's the program I was looking for – Steve Sep 5 '17 at 18:59
  • this is what I needed, yet it did not work for me after upgrading from 17.04 to 17.10 (got a dialog message There are no PPAs to update) and in fact they were not updated. – BCArg Nov 1 '17 at 13:25
0

There is an intriguing simple command as you can now keep PPAs and Third Party Repositories enabled when upgrading to a newer Ubuntu version:

RELEASE_UPGRADER_ALLOW_THIRD_PARTY=1 do-release-upgrade -d

The RELEASE_UPGRADER_ALLOW_THIRD_PARTY environment variable can be used with both the command line and the GUI upgrade tools. So when you want to upgrade your Ubuntu system and keep PPA and third party repositories enabled, run the upgrade from a terminal, like mentioned above for the command version. I guess BEFORE the actual system upgrading. For the GUI version:

RELEASE_UPGRADER_ALLOW_THIRD_PARTY=1 update-manager -d

(-d is used to allow upgrading to development releases - for example to upgrade from Ubuntu 18.10 to 19.04 right now, while Ubuntu 19.04 Disco Dingo is still in development)

It's worth noting that you may still see a warning about third party sources being disabled on upgrade, but those that support the Ubuntu version to which you're upgrading will not be disabled.

A regular Ubuntu release upgrade (to a newer Ubuntu version) disables any PPA or third party repository that may be enabled. Some recent changes to ubuntu-release-upgrader allow keeping PPA and third party repositories enabled when upgrading to a newer Ubuntu release, while also providing better support for cases in which the users have their own mirror of the archive. This is done by using an environment variable, RELEASE_UPGRADER_ALLOW_THIRD_PARTY. Source: Linux Uprising Blog and Brian’s Blog

I only found this solution after the upgrade and run the command anyway, it added a new entry for each PPA with the new Ubuntu version's name in it. I then just had to delete the old ones.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.