Wondering how to remove a PPA from Ubuntu or Linux Mint? I was, so I figured I’d write a quick guide here to show me (and you) how.
Now, there are several ways to remove a PPA from Ubuntu, Linux Mint and other Ubuntu-based Linux distributions. You can use your mouse (aka the GUI way) or you can use your keyboard (aka the CLI way)
In this post I show you both methods. But I will say upfront that the CLI method, while scarier looking, is by far the fastest and safest to use.
Removing PPAs from Ubuntu
I add PPAs to Ubuntu (or more accurately Ubuntu’s software sources list) so that I can install the latest versions of apps, drivers, and other software I want, but which are not available through the regular Ubuntu archive.
In short, PPAs are fast, efficient and …Yeah, not without their own issues.
But the biggest problem I encounter is that not all PPAs are equal.
See, most PPAs are software specific. That’s to say they focus on building and packaging a single app or tool (and any related dependencies it needs) for a certain set of Ubuntu releases. You know that when you add the PPA that it will only affect a specific set of software on your system — no nasty surprises!
But beware of kitchen sink PPAs. These types of PPAs contain a tonne of different packages, drivers, libraries and dependencies, all in the same repo, not all of which may be compatible, stable, or wanted.
It’s all too easy to unknowingly add a kitchen sink PPA to your system to install one app, only to inadvertently upgrade half your OS along with it!
To stop packages I do not want to upgrade from being upgraded when I “have” to use kitchen sink PPA I promptly remove the PPA afterwards — hence this post.
While you can also disable a PPA to prevent unexpected updates, and pin packages to a particular version, there’s little point: if you don’t need to use a PPA, ditch it.
Remove a PPA (CLI)
You can add a PPA to Ubuntu using the command line by running
sudo add-apt-repository ppa:name, entering your root password to authorise the change.
Accordingly, it is just as easy to remove a PPA using the command line. Just run the following command in a new terminal window (press
t to open one up):
sudo add-apt-repository --remove ppa:name/here
You will need to replace
ppa:name with the correct PPA name, in the same syntax. For example:
sudo add-apt-repository --remove ppa:dhor/myway
If you don’t know the PPA name (and you might not; it may have been a while since you added it) you may prefer to remove a PPA using the Software & Updates app, aka the GUI way.
Remove a PPA (GUI)
It’s might be a fairly involved hassle to add a PPA to Ubuntu or Linux Mint using a GUI, but removing one is much simpler.
On Ubuntu, Ubuntu MATE, or similar distro follow these steps:
- Launch Software & Updates
- Click the “Other Software” tab
- Select (click) the PPA you want to delete
- Click “Remove” to remove it
You should be asked to confirm your password after hitting remove, and be prompted to refresh the system’s package list once it has.
If you’re on Kubuntu or KDE Neon you should head to
Muon Discover > Sources > Configure Software Sources to access a list of PPAs.
Do note that every PPA you add will append two lines to your
sources.list.d file: one for the installer packages, and one for the source code. You should remove both entries to fully extract a PPA from your system.
Alternative: Use PPA Purge
When you remove (delete) a PPA from your system you do NOT remove (delete) any packages you installed or upgraded to from it.
To do that, to remove all packages installed from a PPA, downgrade any packages it has affected, and remove the PPA you can use the
PPA Purge tool.
Since it’s a CLI tool I’m going to assume you’re okay installing it from the command line:
sudo apt install ppa-purge
When you have PPA Purge installed you can run:
sudo ppa-purge ppa:name/here
If you don’t know the name of the PPA you want to purge, look it up in the Software & Updates app first.
There are plenty of reasons why you may want to remove a PPA from Ubuntu, Linux Mint and related distros.
The archive may no longer support your Ubuntu version, resulting in errors and warnings appearing when you try to update software; it may have an expired GPG key, which also results in errors and warnings.
Finally, adding lots of PPAs to your system can make updating it a touch slower, as every archive needs to be checked for updates and their package list compared to the existing one.