PPA’s: Silver Sword Or Golden Band-Aid
So, you just had to go overboard with your PPA’s, didn’t you? The lure of bleeding-edge software was just to great for you to be able to stick with the tried-and-true software that was already available in your existing repositories. Not even backports could sate your need to run with the pack.
PPA’s in Ubuntu are a great way to get software you would otherwise have to wait for. Ubuntu, which is on a 6-month release cycle, always has relatively up-to-date software for your general consumption, but when you just can’t wait for the next release, PPA’s provide a good channel for properly packaged updates. That’s not the only audience for PPA’s. A very ‘elite‘ few of us take on the challenge of using an LTS release, taking it from start to finish (3 years). In my case, I have Ubuntu 10.04 running on my laptop, which is getting up there in age and cannot handle anything newer. Though Canonical claims to support the release for 3 years– and they do– getting up-to-date software, even something as fundamental as a web-browser, can be a real challenge. Here we are, only 2 years in the release of Ubuntu 10.04 and most of the software updates that are not critical, have dried up. I still run the latest Google Chrome and many others, but not the full monty.
But you must be careful… Adding a PPA channel to your system is stupidly simple, but once you’ve done it and you’re not properly versed in Debian package management, you may have destroyed your system. In my case, I had been running the latest VLC 2.0 in Kubuntu 11.10. I got this software from a PPA channel just so that I could try out the experimental Blu-Ray support. Little did I know (well, actually, I knew what I was getting into) I would break my package manager.
Let’s Get Busy
First, when you are on Launchpad learning about the PPA you are going to add, READ THE DESCRIPTION! The version of VLC I installed came from Nate Muench’s (Mink) PPA. There is a very clear and friendly warning at the top.
THIS PPA MIGHT BREAK OTHER PACKAGES (it shouldn’t (since they’re backported with minimal changes), but someone recommended that I should note it anyways)
Of course I say to myself, “meh, whatever. I want VLC 2.0 and I want to install it with apt, so… I’m just gonna do it”. And I did.
First off, let me touch on the problem here. PPAs pose little risk to your system when they contain only a couple of packages. Say you want the latest release of snes9x-gtk for a little Super Mario World action. That’s just fine. This PPA on the other hand comes with dozens of packages that are all multimedia related, and all backported from 12.04 beta. For me, it broke many things. It’s really a good idea to stay away from PPAs that support a large set of dependencies. Now, the process…
Identify The Affected Packages
For me, the package that broke was DeVeDe. We use this a lot around the house, so having it broken is a big no-no. The first thing I did was uninstall DeVeDe. Upon trying to install it again, it failed, saying that it needed ‘mencoder’. Now there is a trail to follow.
First I uninstalled DeVeDe, VLC and mencoder. Now that the offending packages are gone, we need to destroy the PPA and downgrade all the packages that it upgraded.
1. Install ppa-purge
sudo apt-get install ppa-purge
2. Purge the PPA.
sudo ppa-purge ppa:n-muench/vlc
Now, not only is the ppa going away, all of the affected packages are being downgraded. Sit back and watch the show for a few minutes, and when it’s finished, we’ll resume.
3. Update your sources.list
sudo apt-get update
4. Clean any partial packages left behind during the wreckage.
sudo apt-get autoclean
5. Clean your apt-cache! This is important if you want apt to continue behaving at the command-line.
sudo apt-get clean
6. Remove any packages that are no longer necessary.
sudo apt-get autoremove
7. Enjoy not having to reinstall your OS!
You’re not likely to catch me using Mac OS X. Why? I like my freedom, and I’ll have it at almost any cost. I won’t get that with Mac OS X, but I do aim to give it a little credit right now. The idea of package management is certainly a good one, but it is not perfect my any means. Too many things to break, and it would take a very advanced user to maintain one without breaking it across several Ubuntu releases. I successfully did this from Ubuntu 7.10 to 9.10 at one point, and how I made it that way seems to be sheer luck. I’ve never been able to operate fully with what’s available in the official repositories. Mac OS X takes a much simpler approach. Most applications are distributed in a .app file, which is essential just an archive of an application and almost all of it’s dependencies. Having a lot of apps on Mac OS X sure does eat up your disk space, but it’s worth it to be able to manage application in the most straight-forward way possible. Sure, you might have 2 applications that use the same library and one app uses a version that’s a little deprecated, but what’s wrong with that? It all just works.