Linux

Complete Guide to PPAs in Ubuntu: Adding, Managing, and Security

This detailed guide explains what PPAs are, how to add, view, and remove third-party repositories in Ubuntu, and also covers security risks and alternative installation formats.

Updated at February 17, 2026
15-20 min
Easy
FixPedia Team
Применимо к:Ubuntu 22.04 LTSUbuntu 24.04 LTSUbuntu 20.04 LTS

Introduction / Why This Is Needed

PPA (Personal Package Archive) is a repository within the Ubuntu ecosystem that allows developers to distribute their programs and updates directly to users, bypassing official channels. This is particularly useful for getting:

  • Fresh software versions: For example, the latest version of GIMP, LibreOffice, or Node.js that isn't yet available in your Ubuntu release's official repositories.
  • Specialized software: Some programs (e.g., certain drivers or utilities) are distributed only through a PPA.
  • Beta versions and nightly builds: For testing new features.

This guide explains how to work with PPAs safely: adding, managing, and removing them.

Requirements / Preparation

Before you begin, ensure that:

  1. You have Ubuntu 20.04 LTS or newer installed (the instructions are relevant for 22.04/24.04).
  2. You have access to an account with sudo privileges (administrator).
  3. The terminal is open (Ctrl+Alt+T).

What Is a PPA and What to Watch Out For

A PPA is a powerful but unofficial tool. The developer creates a repository on the Launchpad platform and signs it with their own GPG key.

⚠️ Important: Security PPAs are not vetted by Canonical (the creator of Ubuntu) as strictly as official repositories. Add PPAs only from trusted sources:

  • The program's official website.
  • The project's GitHub/GitLab page with explicit instructions.
  • Well-known community PPAs (e.g., ppa:graphics-drivers/ppa for NVIDIA drivers). Avoid PPAs from unknown authors—this is the primary vector for distributing malware.

Step 1: Adding a PPA

The standard and simplest method is to use the built-in add-apt-repository utility.

  1. Find the required PPA. The command usually looks like this: ppa:username/ppa-name. For example, for the official OBS Studio PPA: ppa:obsproject/obs-studio.
  2. Execute the command in the terminal:
    sudo add-apt-repository ppa:username/ppa-name
    
    Example:
    sudo add-apt-repository ppa:obsproject/obs-studio
    
  3. The system will:
    • Prompt for your sudo password.
    • Display information about the PPA (description, number of packages).
    • Automatically import the repository's GPG key.
    • Automatically run apt update to refresh the package list.

How does this work under the hood? The command creates a new file in /etc/apt/sources.list.d/ (e.g., obsproject-ubuntu-obs-studio-jammy.list) and adds a line with the repository's address to it.

Step 2: Installing Software from a PPA

After successfully adding the PPA and updating the package list, install the desired program as usual:

sudo apt update
sudo apt install package-name

APT will automatically select the package version from the PPA if it is newer than the one in the official repositories. To verify that the package will be installed from the PPA, use:

apt policy package-name

The output will show the source (URL) from which the package will be installed.

Step 3: Viewing Added PPAs

To see a list of all third-party repositories added via add-apt-repository:

Method 1 (via filesystem):

ls -la /etc/apt/sources.list.d/

The output will contain files with the .list extension, each corresponding to one PPA.

Method 2 (filtering content):

grep -r ^ /etc/apt/sources.list.d/ | grep -v "^#"

This command will output all active (uncommented) lines from all files in that directory.

Method 3 (via apt):

apt policy | grep http | grep -v "archive.ubuntu.com"

Will show only "non-standard" package sources.

Step 4: Removing a PPA

If a PPA is no longer needed, remove it using one of the following methods:

This is the cleanest method, as the utility removes both the configuration file and any associated keys (if they were added separately).

sudo add-apt-repository --remove ppa:username/ppa-name

Example:

sudo add-apt-repository --remove ppa:obsproject/obs-studio

Method B: Manual File Deletion

If the command above fails for some reason, locate the corresponding file in /etc/apt/sources.list.d/ and delete it:

# 1. Find the file (e.g., for ppa:graphics-drivers/ppa)
ls /etc/apt/sources.list.d/ | grep graphics-drivers

# 2. Delete it (replace filename.list with the actual name)
sudo rm /etc/apt/sources.list.d/graphics-drivers-ubuntu-ppa-jammy.list

# 3. Update the package list
sudo apt update

Important: What Happens to Software Installed from the PPA?

Removing a PPA does NOT remove programs already installed through it. They will remain on your system. To completely remove a program along with its configuration, use sudo apt purge package-name.

Step 5: PPA Alternatives (Snap and Flatpak)

Modern Linux distributions, including Ubuntu, actively develop isolated software distribution formats:

  • Snap: Canonical's official format. Installed from the Snap Store (snap install <name>). Packages are isolated and update automatically. Many modern applications (Chrome, VS Code, Spotify) are shipped as Snaps.
  • Flatpak: A cross-distribution format from Freedesktop.org. Installed via flatpak install <name>. Uses the central Flathub repository.

When to choose what?

  • PPA: For classic .deb packages that integrate deeply into the system (drivers, system libraries, older software versions).
  • Snap/Flatpak: For isolated, secure, and cross-platform application distribution (especially GUI apps). They do not conflict with system packages.

Verification

After completing all steps, verify that:

  1. The PPA is added: The file exists in /etc/apt/sources.list.d/.
    ls /etc/apt/sources.list.d/ | grep -i "your_ppa_name"
    
  2. Packages from the PPA are available: apt policy <package> shows the PPA source.
  3. The program works: Launch the installed application from the menu or via command.
  4. The system is updated: sudo apt update completed without errors.

Common Issues

NO_PUBKEY or GPG error

Symptom: During sudo apt update, you see W: GPG error: http://ppa.launchpad.net ... The following signatures couldn't be verified because the public key is not available: NO_PUBKEY <XXXXXX>.

Solution: Automatically (usually works):

sudo apt update

If that doesn't work, manually:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys XXXXXX

Then run sudo apt update again.

Package Version Conflicts

Symptom: apt install or apt upgrade reports dependency conflicts or suggests removing critical system packages.

Solution:

  1. Do not force the installation (apt install -f might worsen the situation).
  2. Check where the package is being proposed from (apt policy <package>).
  3. The PPA might be incompatible with your Ubuntu release (e.g., built for focal while you are on jammy). In this case, look for an alternative PPA or use Snap/Flatpak.

PPA Unavailable or "404 Not Found"

Symptom: apt update outputs 404 Not Found for the PPA address.

Solution:

  • The developer may have discontinued PPA support for your Ubuntu release.
  • Check the PPA page on Launchpad to see if builds exist for your Ubuntu version (e.g., jammy for 22.04).
  • If not—look for alternatives (a different PPA, an official .deb from the website, Snap/Flatpak).

Final Recommendations

Working with PPAs involves a balance between accessing fresh software and maintaining system stability. Follow these rules:

  1. Add consciously. Each PPA is a potential source of problems. After installing software from a PPA, regularly update your system (sudo apt upgrade).
  2. Remove what you don't need. A clean list of repositories in /etc/apt/sources.list.d/ ensures predictable apt behavior.
  3. Have a plan B. If the software is critical for your work, check if it's available in Snap, Flatpak, or as an official .deb package from the website.
  4. Don't mix channels. Try not to install the same program simultaneously from the official repository and a PPA—this will guaranteed cause version conflicts.

Proper repository management is a key skill for an advanced Ubuntu user who wants up-to-date software without sacrificing system stability.

F.A.Q.

Is it safe to add PPA repositories in Ubuntu?
How do I find a PPA for a specific program?
What should I do if I get a GPG key error after adding a PPA?

Hints

Understand what a PPA is and assess the risks
Add a PPA via the terminal
Install or update software from the PPA
View the list of added PPAs
Remove an unnecessary PPA
Perform a full system update

Did this article help you solve the problem?

FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community