Learn how to remove a PPA from Ubuntu or Linux Mint in this quick, easy-to-follow guide complete with screenshots.
There are several ways to remove a PPA from Ubuntu, Linux Mint and other Ubuntu-based Linux distributions. You can use the mouse (aka the GUI way) or you can use the 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 way to delete an apt repository that you have added to your system.
Why Remove a PPA in 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 Method)
To add a PPA on Ubuntu you use the command
sudo add-apt-repository ppa:name, then enter your root password to authorise the change.
But is just as easy to remove a PPA in Ubuntu using a similar command. In a new terminal window (press
t to open one up) run the command:
sudo add-apt-repository --remove ppa:name/here
ppa:name with the relevant 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 can remove Ubuntu PPAs using the Software & Updates app — aka the GUI way.
Remove a PPA (GUI Method)
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 will be asked to confirm your password (enter it) and see a prompt 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 totally remove a PPA from your system.
Alternative Method: 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.