Since none of the answers actually explain what a PPA is (focusing on how to add them), please think twice before closing "what is a PPA" type questions as duplicates and linking here. Leaving one of them open might actually encourage someone to answer.
–
Chan-Ho SuhMay 6 '12 at 8:29

What is PPA?

PPAs are for non standard software/updates. They are generally used by people who want the latest and greatest. If you are going extra lengths to get this kind of software, then you are expected to know what you are doing. The selection in the Software Centre is ample for most human beings.

Command Line

On the command line you can add a PPA using add-apt-repository, e.g.:

sudo add-apt-repository ppa:gwibber-daily/ppa

To remove a PPA remove the corresponding files in /etc/apt/sources.list.d (this does not remove the packages you installed from the PPA). To see the packages available from a PPA or remove packages installed from a PPA press the "Origin" button on the lower left of the Synaptic window and choose the PPA from the list.

With can use the usual Software Sources dialog and add ppa:gwibber-daily/ppa where it asks for a APT line and enable or disable them just like other repositories.

As anybody can create a PPA there's no guarantee for quality or security of a PPA - just like with any other unofficial software source you have to decide yourself if a PPA it's trustworthy or not. And like any other unofficial software packages from a PPA can cause all sorts of difficulties especially when upgrading to a new release of Ubuntu.

If you get an error that the add-apt-repository command could not be found:

It bothers me that on the linux that claims to be for human beings adding a ppa requires either magic text on the command line or magic text added to a gui tool. It really isn't good enough.
–
trampsterSep 30 '10 at 20:54

43

PPAs are for non standard software/updates. They are generally used by people who want the latest and greatest. If you are going extra lengths to get this kind of software, then you are expected to know what you are doing. The selection in the Software Centre is ample for most human beings.
–
dv3500eaSep 30 '10 at 20:59

@trampster Does Windows/Mac keep on top of all its software, giving you updates to it all? PPAs are a security risk and there needs an element of design to stop users being idiots. More: thepcspy.com/read/linux-isnt-invulnerable
–
Oli♦Oct 1 '10 at 17:19

2

The recent high demand for PPAs seems to be a result of the dramatic changes in Ubuntu recently, making the stable versions woefully inadequate for a large number of people. This is the first release where I've needed to add more than 1 or 2 fairly unimportant PPAs - previously it has been only to test bug-fixes for me.
–
Sean HoulihaneNov 2 '11 at 7:55

For Ubuntu 10.10

While many find it easier to add PPAs using command line tools, this can be done through Ubuntu Software Center for those who prefer graphical interfaces. For this demo, we will be adding the PPA for the Banshee Team in order to get the latest stable release of Banshee.

We'll begin by opening the Ubuntu Software Center which can be found in the Applications menu.

Applications > Ubuntu Software Center

Now in Software Center, go to Edit > Software Sources

You will be asked to enter your administrative password.

Now in Software Sources open the Other Software tab and press Add.

In this dialog, we will enter the PPA's information.

This information is found on the PPA's website in bold under the heading Adding this PPA to your system. For the Banshee PPA, it looks like this:

Now we can close Software Sources and Software Center will automatically update so that you can access the new packages from the PPA.

The packages available from the PPA can be seen by expanding the Get Software menu in Software Center's left column.

For Ubuntu 10.04

To add a PPA in Ubuntu 10.04:

Run System->Administration->Software Sources:

You will be prompted for your password. Note that you can only add a PPA if you are an administrator user due to the security risks and system wide consequences of adding a PPA. Enter your password into the dialog to continue:

In the Software Sources window, click on the 'Other Software' tab and click the 'Add...' button. This will bring up a prompt asking for the 'APT line':

The text to paste into this box is found on the launchpad page in the 'Adding This PPA to your System' in bold letter.

Paste the line you copied into the text box in Software Sources (CTRL+V):

Close the Software Sources window; you will be asked to reload your package information. Do this by clicking the 'Reload' button:

You can now find software packages from this PPA in Ubuntu Software Centre:

What is a PPA?

It's all very simple once you get the hang of it. I have run into problems here and there, but generally speaking, PPA's are the only way to get your software updated in Ubuntu between distro releases (don't get me into a rant about that). It's too much to explain here, so I will point you to some worthwhile documentation. But first, a few simple rules:

Know what you're installing. Most likely you'll use Launchpad for the majority of your PPA needs, but even so it can be dangerous to your computer. Usually the worry for me is not malicious intent, but conflicting packages. If package A requires a modified version of ffmpeg, and package B in a different repository requires a modified version of ffmpeg too, well, now there's a good chance you might not be able to watch videos, for example, with package A or B or at all.

Keep in mind that anyone can create a PPA, even you. Just because a person signs the Code of Conduct doesn't mean they know what they're doing. On Launchpad there is not only updates to stable releases, but also beta and alpha software, and even stuff that doesn't quite work at all yet. There are many useful repositories, such as to get the latest Nvidia drivers or the current stable release of Pidgin. Then again, there's stuff that some guy made in his basement for himself and a couple of friends.

That said, the Ubuntu documentation web pages should have everything you need to know in a pretty understandable format.

A quick note: I assume you're using Ubuntu 10.04. If you're using 10.10 there is no more "Software Sources" in your menu, even though it is referred to in some of the documentation. To access it simply open the Synaptic Package Manager then select Settings -> Repositories from the menu.

Good Luck and I hope this was helpful.

Edit: Please know that installing software through the Ubuntu Software Center can be troublesome. This is because it does not tell you what dependencies a particular app you want to install requires. That is, you could install the entire KDE desktop, hundreds of MB's worth of stuff, just to get a screen ruler or firewall configurator. I learned this the hard way... For example, type "kruler" in the search box and you will see the final install size as almost 100 MB. At least pay close attention to the final install size if you insist on using the USC. Most new users are unfamiliar with the concepts of window managers and desktop environments having only known Windows, so be careful about simply relying on USC and not learning all about PPAs, which is what I recommend. It's a little more work and this is just my opinion, but you'll probably be happy you did! :)

One thing to keep in mind about using PPAs is that when you add a PPA to your Software Sources, you're giving Administrative access (root) to everyone that can upload to that PPA. Packages in PPAs have access to your entire system as they get installed (just like a regular package from the main Ubuntu Archive), so always decide if you trust a PPA before you add it to your system.

If you are having a hard time figuring out the correct add-apt-repository command to run, someone has created a script called ppasearch to make this task easier. To install ppasearch, you will need to run the following commands:

If you are on maverick, you can manually download and install the lucid deb. It should work fine.

This will add the ppasearch PPA (and its key) and install the package. You can run the script by typing the following command in a terminal:

ppasearch PPANAME

So to find the Cardapio team PPA, you might run:

ppasearch cardapio

As you can see from the screenshot below, you are then presented with a list of matching PPAs. Once you select the PPA you want, it will get added by the script by using add-apt-repository. ppasearch will even run sudo apt-get update for you if you wish to update your sources.

There is also a video of the script in action, but it is slightly out-of-date.

This script should make it easy for you to add PPAs and their keys without having to search around Launchpad.

It may not be safe to just disable any PPA added to our sources by removing it from sources.list or by unticking the PPA in our Software Sources settings. It would then be a much better idea to also remove all packages that were installed from this PPA and replace them with Ubuntu default packages.

To do so we have the script ppa-purge that will not only remove the unwanted PPA but also will replace packages that were installed from this PPA by the default Ubuntu versions. After installation simply run

sudo ppa-purge ppa:<lp-name>/<ppa-name>

where <lp-name>/<ppa-name> is the same name we entered to our sources when adding this PPA. The PPA will then be removed. Packages installed from this PPA will be replaced by default Ubuntu packages (installed packages that are not in the default repositories will not be deleted).

As an answer with a comment pointing to ppa-purge was removed, I felt we may still need a reference for this in our list of answers on how to use a PPA.
–
TakkatDec 30 '11 at 22:51

What does lp stand for? For example in precise-partner.list what is the lp?
–
isomorphismesJun 18 at 14:05

1

@isomorphismes: Ubuntu PPA are hosted on launchpad (lp) with their specifc name and sub-name, e.g. ppa:takkat-nebuk/takkat. In this example takkat-nebuk is my lp-name and takkat is the name of the ppa to add to your sources.
–
TakkatJun 18 at 14:14