In an effort to install various apps in Ubuntu or other Linux distribution, we often add several PPA. Most of the times these PPAs are managed by a single developer as he might have created a certain app for personal amusement or as a hobby.
Over the time these PPAs might not be updated with latest version of operating system. This might create trouble when you try updating Ubuntu.
You may have other reasons as well for deleting or removing a PPA from your system.
Note: You should remove the application installed by the PPA before removing the PPA itself. You can use the ‘apt remove’ command for that.
How to remove a PPA
There are several ways to remove a PPA in Ubuntu. You can do it from Software Sources list, by removing the source files from the directory or the simplest way by using apt. There are different advantages of all of them. We’ll see all methods to delete a PPA in detail:
Method 1. Remove a PPA from Software Sources via GUI:
This method is apt for those of you who prefer to use GUI over command line. While you are using Linux, I highly recommend that you use command line. But lets see how to remove PPA in graphical manner.
Go to Unity dash (by pressing the super or Windows key) and search for Software Sources:
In the Software Sources, go to Other Software tab and choose the desire PPA from the list. Afterwards click on Remove to remove it:
2. Remove a PPA using APT in terminal:
Mostly, you add a PPA using add-apt. We’ll use same add-apt to remove a PPA.Use the following command in terminal:
sudo add-apt-repository --remove ppa:PPA_Name/ppa
In the above command replace PPA_Name with the desired PPA name. By this time you might have realized that you need to know the exact PPA name to use this otherwise straight forward method.
3. Remove a PPA from the source list in terminal:
Alternatively, you can remove the PPA from sources list where these PPAs are stored. PPAs are store in the form of PPA_Name.list. Use the following command to see all the PPAs added in your system:
sudo ls /etc/apt/sources.list.d
Look for your desire PPA here and then remove the PPA using the following command:
sudo rm -i /etc/apt/sources.list.d/PPA_Name.list
4. Remove a PPA by using ppa-purge in terminal:
You might have noticed that in all the above three methods we only talked about deleting or removing a PPA. What about the applications installed using these PPAs? Will they be removed as a result of removing the PPA? The answer is NO. So this is when PPA purge comes in picture. It not only removes the PPA but also uninstalls all the programs installed by the PPA.
Install ppa-purge by using the following command:
sudo apt-get install ppa-purge
Now use it in following manner to purge the PPA:
sudo ppa-purge ppa-url
The URL of the PPA can be found in the Software Sources list.
I hope you’ll find at least one good method to delete or remove a PPA and uninstall the corresponding applications. You may want to check this post to know how to add or remove installed programs in Ubuntu. Cheers :)