How to remove a PPA from Ubuntu via the command line. Delete, purge or remove repository from Ubuntu Terminal. Personal Package Archives or PPA are used to install and upload Ubuntu source packages as an apt repository. In this tutorial we will learn about removing and deleting PPA from Ubuntu via command line.
GUI Method To Remove PPA
For those who find command line to be a bit tricky and confusing, they can easily uninstall and remove a PPA using GUI method. Software & Updates application is a GUI applications that allows you to add or remove or delete PPAs. To use the application, open Software & Updates from Ubuntu dash. Once the Software & Updates window is open, go to Other Software tab and here you will see a list of PPAs installed on the system. To remove a PPA from the list, simply click the PPA and then click the Remove button at the bottom.
Command line Method To Remove PPA
There are several command line ways to uninstall and remove a PPA. Let us learn about some of the popular commands to remove a PPA from Ubuntu.
1. Purge a PPA
PPA purge is used to remove the PPA and also uinstall the programs installed by the same PPA. The basic format to remove a PPA using purge is “sudo ppa-purge ppa:PPA_NAME” Please note that you will have to install the ppa-purge archive to use the command. To install PPA purge, run “sudo apt install ppa-purge” in terminal. Once the PPA purge is installed, you can use it to uninstall the PPA.
Let us understand how to use PPA purge via an example. Say that we need to uninstall and remove maarten-baert/simplescreenrecorder PPA. To do so run:
sudo apt install ppa-purge
sudo ppa-purge ppa:maarten-baert/simplescreenrecorder
2. Remove a PPA
To remove a PPA, use –remove or remove-apt-repository commands. To use this command you will need the name of the PPA. For example:
Command Format: sudo apt-add-repository –remove ppa:PPA_NAME
sudo apt-add-repository --remove ppa:maarten-baert/simplescreenrecorder
Command Format: sudo remove-apt-repository ppa:PPA_Name
sudo remove-apt-repository ppa:maarten-baert/simplescreenrecorder
3. Use Sources List To Remove A PPA
Ubuntu users can easily remove a PPA from /etc/apt/sources.list. All the PPAs installed on the system are stored in the /etc/apt/sources.list in the form of PPA_Name.list. Before you begin editing or working on /etc/apt/sources.list, please make a backup of the configuration file using the following command:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
Now see the name of PPA stored in the /etc/apt/sources.list file by running the following command:
sudo ls /etc/apt/sources.list.d
Find the name of the PPA you wish to remove and note it down. Now run the rm command to remove the PPA. To do so, run the command:
Command Format: sudo rm -i /etc/apt/sources.list.d/PPA_Name.list
sudo rm -i /etc/apt/sources.list.d/atareao-ubuntu-sunflower-xenial.list
If you don’t like working on any of these methods to remove a PPA, simply install YPPA Manager. The YPPA Manager is a graphical tool to manage PPA on Ubuntu Systems. Follow this link to read more about YPPA Manager http://sourcedigit.com/20316-y-ppa-manager-install-ppa-ubuntu-add-ppa-ubuntu-command-line/