In the effort to install various applications in Ubuntu or other Linux distribution, you often end up adding several PPA.
Over the time these PPAs might not be updated with the latest version of the operating system. This might create trouble when you try updating Ubuntu. You may end up with โRepository does not have a release fileโ error.
You may have other reasons as well for deleting or removing a PPA from your system. Whatever be your reason, let me show you how to remove a PPA from your system.
Removing a PPA in Ubuntu Linux
There are several ways to remove a PPA in Ubuntu.
You can do it from the Software & Updates application, by removing the source files from the directory or by using the add-apt-repository command. Iโll show all these methods one by one.
Method 1. Remove a PPA from Software Sources via GUI
This method is suitable if you prefer to use GUI over command line. To me, command line is easier but I can understand that not everyone likes it.
Press the Super key (Windows key) and search for Software & Updates tool.
In the Software & Updates tool, go to Other Software tab and choose the desire PPA from the list. Afterwards click on Remove to delete the PPA:
That was easy, right? Let me show an even easier method with the command line.
Method 2. Remove a PPA using APT in the terminal
Itโs most likely that you added the PPA using add-apt-repository command. You can use the same command to remove the PPA as well. Just give it --remove
option in the command.
You need to know the exact PPA name here, of course. You can use the command in the following manner.
sudo add-apt-repository --remove ppa:PPA_Name/ppa
In the above command replace PPA_Name
with the correct PPA name.
Method 3. Remove a PPA from the source list in the terminal
Not my preferred method at all. I donโt recommend it as well but it gets the job done.
You can remove the PPA from the sources list where these PPAs are stored. PPA repositories are store in the form of PPA_Name.list.
Use the following command to see all the PPAs added in your system:
ls /etc/apt/sources.list.d
Look for your desire PPA here and then remove the .list file associated with the PPA using the following command:
sudo rm -i /etc/apt/sources.list.d/PPA_Name.list
The -i
option with rm command asks before removing a file. Consider this a safety check.
Method 4. Remove a PPA by using ppa-purge in the 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 disables the PPA but also uninstalls all the programs installed by the PPA or revert them to original version provided by your distribution.
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.
There is more to PPA...
You may find the concept of PPA overwhelming, especially because it is an Ubuntu specific tool and there is no proper documentation available around it.
For this reason, I have written this detailed guide that tells you all the essentials about PPA you should know as an end user.
I hope youโll find at least one good method to delete or remove a PPA and uninstall the corresponding applications. Cheers :)