Categories: Ubuntu

How To Safely Remove PPA Repositories in Ubuntu

Personal Package Archives, popularly known as PPA repositories, provide Ubuntu users a way to get new and updated software regularly. Some of these repositories are official and provided by Ubuntu developers. However, often these PPAs contain third party apps. This article will explain how to remove PPA repositories in case you don’t want them and the software that comes along with them. It is a common practice to remove all third party PPAs before upgrading to newer versions of Ubuntu.

Graphical Method

To remove PPAs using a GUI app, an application named “Synaptic Package Manager” needs to be installed. Run the following command to install Synaptic:

Sponsored
$ sudo apt install synaptic

Launch Synaptic from the application menu and go to “Settings > Repositories > Other Software” tab.


To disable a PPA, uncheck checkboxes for both the main repository and its source code repository. Click on the “Close” button to exit. You may be prompted to reload repositories, click on “Reload” to refresh all repositories added to your Ubuntu system.


Wait for the reload process to finish. Note that disabling PPAs from the “Other Software” tab will remove repositories only. Any packages you upgraded or installed from PPA repositories will remain unchanged. Unfortunately Synaptic doesn’t provide an automatic way of removing both repository source and packages installed from it. You can manually remove packages from Synaptic using two methods.

In the first method, you will have to manually remove packages before disabling repositories in the “Other Software” tab. Click on the “Origin” tab in the sidebar and click on the repository you intend to remove. Remove all packages from the highlighted repository, as shown in the screenshot below:


Once done, you can proceed to disable repositories in the “Other Software” tab.

The second method can be used after removing repositories in the “Other Software” options. Click on the “Status” tab and highlight the “Installed (manual)” entry in the sidebar. Find packages that you installed from PPA and remove them manually.

Sponsored

Command Line Method (Better Approach)

This method requires installing a handy command line utility called “ppa-purge”. This tool not only allows you to remove PPA repositories, but also removes or downgrades associated packages automatically.

To install ppa-purge in Ubuntu, use the command below:

$ sudo apt install ppa-purge

Now to purge a PPA completely along with the packages that came with it, run a command in the following format:

$ sudo ppa-purge <address_of_the_repository>

For instance, to purge Papirus icon theme PPA, you will have to run the following command:

$ sudo ppa-purge ppa:papirus/papirus

You should get some output as shown below. Wait for the process to finish. Packages in the repository will be either removed or downgraded to stock Ubuntu version if they already existed in official Ubuntu repositories and were installed on your system prior to running ppa-purge command.

Conclusion

If you frequently install third party apps on your Ubuntu system or you like to tinker with your desktop by adding third party PPA repositories, things can break and you might want to revert the packages. In such cases, ppa-purge can be pretty useful. You can also install synaptic and aptitude package managers to fix broken packages. If you have these three utilities installed on your system, you can solve most of the packages and PPA repositories related issues on your Ubuntu system.

Ubuntu Server Admin

Recent Posts

Building RAG with enterprise open source AI infrastructure

One of the most critical gaps in traditional Large Language Models (LLMs) is that they…

3 hours ago

Life at Canonical: Victoria Antipova’s perspective as a new joiner in Product Marketing

Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…

1 day ago

What is patching automation?

What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…

2 days ago

A beginner’s tutorial for your first Machine Learning project using Charmed Kubeflow

Wouldn’t it be wonderful to wake up one day with a desire to explore AI…

3 days ago

Ubuntu brings comprehensive support to Azure Cobalt 100 VMs

Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…

3 days ago

Ubuntu Weekly Newsletter Issue 870

Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…

4 days ago