You can quickly remove or delete a PPA from Ubuntu (as well as Ubuntu-based distributions like Linux Mint) — and in this post I show you how.

You can remove PPAs using a graphical interface (GUI), or you can do it from the command-line (CLI).

Both methods do let you do the same thing: remove a PPA from your system.

The one you choose is up to you — but first, why?

Removing PPAs from Ubuntu is Important

Many of us add PPAs to Ubuntu (or more accurately add PPAs to our list of software sources) to access to new or updated apps, tools, and other software; test development or unstable packages; upgrade to a newer kernel version, and more.

Not removing PPAs you don’t use is a potential security risk

But while PPAs are useful they can have drawbacks.

When you add a PPA to Ubuntu you give the owner root access to your entire system. While no-one has ever misused the trust to distribute dodgy updates, it is a legitimate risk.

Another problem is that PPA owners can add new packages at any time. You may add a PPA to install one specific thing but the owner could adds more packages down the line, and you wouldn’t know.

And if those new packages match ones on your system—bam, they’re upgraded.

Finally, if you add too many PPAs it will make running a check for updates considerably slower.

If you longer use or need a PPA you should prune then — let’s look at how.

How to remove a PPA from the command line

Remove PPA using a terminal

When you add a PPA on Ubuntu using the command line you run the command: sudo add-apt-repository ppa:name command.

Helpfully, you can run the same command to remove a PPA too by adding the --remove flag:

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

Obviously you need to replace ppa:name in the example above with the correct PPA syntax you wish to remove — if you can’t remember it, keep reading…

While the above command will remove PPAs from your system it will not uninstall or downgrade any packages you installed from it. This can become an issue down the line if, causing unresolvable package conflicts during upgrades.

Rather than manually hunt down and downgrade packages by hand you can use PPA Purge. PPA Purge will remove a PPA and uninstall app packages installed from it (downgrading versions where possible):

PPA purge can remove PPAs safely
PPA Purge is the recommend way to remove a PPA

Since PPA Purge is a command-line only tool you won’t find it listed in Ubuntu Software. To install it, run this command:

sudo apt install ppa-purge

With PPA Purge is installed, you then run:

sudo ppa-purge ppa:name/here

Don’t know the name of the PPA you want to remove? You can check it in the Software & Updates app (see below).

Remove a PPA (GUI Method)

The Software & Updates app in Ubuntu showing a list of PPAs in the Other Software tab

The CLI methods listed above require you to know a PPA name in order to remove it. And you might not; you may added the PPA ages ago. A memory-free alternative to remove PPAs from the Software & Updates tool instead.

Adding a PPA using this app is a chore, but removing one is much simpler:

  1. Open the Software & Updates tool
  2. Click “Other Software” tab
  3. Select the PPA you want to delete
  4. Click “Remove” to remove it

On removal you’ll be asked to confirm your password (enter it) and a prompt will appear to tell you to refresh your system’s package list.

If you’re on Kubuntu or KDE Neon you can head to Muon Discover > Sources > Configure Software Sources to access a list of PPAs and manage (i.e. delete, remove, update, edit) them there.

Do note that each PPA you add appends two lines to your sources.list.d file: one for installer packages, and one for source code. You should remove both entries to entirely remove a PPA.

Finally, removing a PPA using a GUI will also not uninstall/downgrade packages installed from it, which makes the command-line PPA Purge tool the most effective choice overall.

Success?

There are plenty of reasons why you may want to remove a PPA from Ubuntu.

It may no longer support your Ubuntu version, causing errors and warnings to appear when you update apps; the GPG key may have expired; or it may have added newer/unstable versions of apps you don’t want to install.

But by using the information in this guide you know how to remove a PPA when no longer required, allowing you to improve your system’s performance, security, and stability.