What Is a PPA in Ubuntu, and How Do You Use It?

Before you can understand what a PPA is, you need to take a step back and look at what a Linux software repository is. Every time you install a piece of software on your Linux system using your package manager, it’s coming from a software repository. Each distribution configures its repositories slightly differently, but they all serve generally the same purpose. They contain a set of software and serve it to your package manager whenever it requests a package.

Ubuntu Sources

Distributions have their own base set of software repositories. Those are located across an array of servers located around the world, but you don’t really need to worry about that. Your computer is configured during the install process to use the right ones. You can take a look at them, though. On Ubuntu and Debian, the core repositories are configured in a file at “/etc/apt/sources.list.”

You can open it up in your favorite text editor and take a look. Each line follows the same pattern. They all begin with deb. That lets the package manager know that the address that follows is a repository.

After the URL, you’ll find the name of the release. If you’re on the latest version of Ubuntu, it’ll say “Bionic.” That tells the package manager which release to pull software for.

Following the release, you’ll find any combination of three keywords. They’re different between Ubuntu and Debian. Debian uses “main,” “contrib,” and “non-free.” Ubuntu uses “restricted,” “universe,” and “multiverse.” They serve similar purposes, though. Those keywords categorize the software in the repositories and tell the package manager which categories to pull from.

There’s another piece that you can’t quite see here. All the repositories are signed with a GPG key. If Apt doesn’t have that key, it won’t install the software. That helps to verify that no one has been messing with the software in the repositories and potentially compromising your system.

PPA stands for Personal Package Archive, and in reality, it’s no different from any other Debian/Ubuntu repository. When you add a PPA to your Ubuntu system, you’re adding another software repository for your package manager to pull from.

Unless you tell it to do otherwise, Apt won’t differentiate or prioritize one repository over another. That means you can add a PPA with more updated packages to your system, and Apt will automatically use the newer packages instead of the default ones.

Launchpad PPA

Canonical, the people behind Ubuntu, also created a service to host PPAs and other software projects called Launchpad. You can find literally thousands of projects on Launchpad, and while they aren’t all PPAs, a good chunk of the PPAs that you do find will be hosted on Launchpad.

None of this really answers the core question, though. That’s because there’s one main point of difference that sets PPAs apart from regular Debian repositories. That’s the way you install them on your system.

When you add a regular Debian repository, you need to manually add the location of the repository to your “sources.list” file. You can also add a separate file in “/etc/apt/sources.list.d/.” Either way, you need to do it manually. You’ll need to import the GPG signing key for the repository manually as well.

Ubuntu Graphics PPA

When you add a PPA in Ubuntu, you can do it with a single command. Everything is already configured to automatically set itself up. The commands below will add the Ubuntu proprietary graphics PPA.

The first command actually adds the PPA. The second one just tells Apt to update. Notice the above picture. It shows you what the manual version would look like. It even includes the GPG key for you to import.

It’s easy to see why PPAs are a good thing. They make adding entire software repositories to your Ubuntu as simple as possible. There’s not a whole lot that you can mess up in adding a PPA, while manually adding software repositories can be a pain. PPAs are a perfect example of how Ubuntu was designed to make using Linux easier. They don’t do anything new or special, but they make something old and cumbersome much more streamlined.

Leave a Reply

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.