Ubuntu

How to Remove a PPA Repository in Ubuntu 22.04

Being an Ubuntu 22.04 user, you may have utilized PPA repositories for installing some specific software. However, most of the time, these PPA do not get updated with the most recent operating system. This situation can turn out into trouble if you try to update or upgrade Ubuntu 22.04 system. Therefore, it is an ideal approach to remove or delete the unwanted repositories from your system.

This blog will discuss the procedure of removing PPA repository in Ubuntu 22.04.

  • using terminal
  • using Ubuntu Software Center (GUI method)

Let’s get started!

How to remove a PPA repository in Ubuntu 22.04 using terminal

In Linux-based systems such as Ubuntu 22.04, “add-apt-repository” command is utilized as a Python script that assists in adding an “APT” repository to the “/etc/apt/sources.list.d” directory. It also permits removing repositories from your system that already exists.

In this section, we have compiled the instructions for removing a PPA repository in Ubuntu 22.04 with the help of the “add-apt-repository” command.

Step 1: List PPA repositories
To print out the list of added PPA repositories in Ubuntu 22.04, press “CTRL+ALT+T” to open up the terminal and execute the following “apt policy” command:

$ apt policy

As you can see, the last entry is about the “ansiblerepository which we have added in our system. We will now delete the mentioned repository by utilizing the “add-apt-repository” command:

To do so, utilize the following command in your Ubuntu 22.04 terminal:

$ sudo add-apt-repository --remove ppa:ansible/ansible

Hit “Enter” to remove the selected “ansible” repository from your system:

Now, let’s check out the GUI method of removing PPA repository in Ubuntu 22.04.

How to remove a PPA repository in Ubuntu 22.04 using GUI

Ubuntu 22.04 also permits its users to remove a specific PPA repository using Ubuntu Software Center. If you prefer to utilize GUI over the terminal, then you are at the right place.

In order to remove a PPA repository using GUI, firstly search for “Software & Updates” in the “Activities” menu and open it:

Your Ubuntu Software Center application will somehow look like this:

Switch to the “Other Software” tab and unmark the repository which you want to remove:

Next, enter your Ubuntu 22.04 system password for authentication purposes:

That’s it. The selected PPA repository is successfully removed from our Ubuntu 22.04:

We have compiled the simplest methods for removing a PPA repository in Ubuntu 22.04.

Conclusion

In Ubuntu 22.04, you can utilize both terminal and GUI for the purpose of removing a PPA repository. For the first method, execute the “add-apt-repository” command in the Ubuntu 22.04 terminal while mentioning the name of the repository that is no longer required. Whereas, in the GUI method, Ubuntu Software Center can help in removing the existing repositories from the system. This blog demonstrated the method to remove the PPA repository in Ubuntu 22.04 using terminal and GUI.

About the author

Sharqa Hameed

I am a Linux enthusiast, I love to read Every Linux blog on the internet. I hold masters degree in computer science and am passionate about learning and teaching.