I keep reading about Personal Package Archives ('PPAs') and people answer questions with a link to a PPA. What's the best way to use these?
There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience, an index of each is below.
For Ubuntu 11.04 and newer
Before adding a PPA you should be aware of some of the risks involved:
Always remember that PPAs are provided by the community, you should be aware of the possible risks before just adding a PPA.
First open the dash by either clicking on the Home button (On the top-left Corner) or pressing the Super Key .
Search for 'Software Center' and launch the Ubuntu software center.
Move the mouse to the top panel where the name of the application is written.
Now Go to the Edit menu and select Software Sources.
For newer versions, right click and click Software and Updates
Then, click Other Software,
Enter your password when prompted.
Switch to the 'Other Software' tab.
Now click 'Add', a box will appear.
You have to enter the PPA in the box. It can be found in BOLD on the launchpad page.
Now click 'Add source' and close the Software Sources. The cache will be refreshed
Now install the software from the software center.
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.: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:On 12.04 and earlier, install the
python-software-properties
package:On 14.04 and later:
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.
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 pressAdd
.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:
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.
Repositories in Ubuntu: https://help.ubuntu.com/community/Repositories/Ubuntu
Software management: https://help.ubuntu.com/community/SoftwareManagement
Repositories and the command line: https://help.ubuntu.com/community/Repositories/CommandLine
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.
Removing a PPA with ppa-purge
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
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).If you are having a hard time figuring out the correct
add-apt-repository
command to run, someone has created a script calledppasearch
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 runsudo 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.
http://www.winehq.org/site/download-deb is my attempt at doing this for the Wine PPA.
I'll note that Maverick changed and now I have to edit the instructions again (there is no more administration->software sources but instead you have to go there from Software Center).
Launchpad's built in instructions are a bit better than they were a year or so ago, but still pretty bad.
For Information on PPA (Personal Package Archive) Visit Ubuntu help on PPA.
There is Y PPA Manager available for Ubuntu. It is a GUI tool to manage PPAs in the best possible way.
To install
y-ppa-manager
run following command in the terminal:For more information and key-features, visit https://launchpad.net/y-ppa-manager.
How to find PPA? (Solution when
apt
unable to locate package)You can find PPA from launchpad page as suggested in following image:
You can find PPA from Ubuntuupdates -Package Search as shown in the following picture:
Then Add repository from terminal as following: