How to safely remove PPA repositories in Ubuntu

Ubuntu is the most common Linux system that assists users in installing the application by using PPA. PPA is abbreviated as “Personal Package Achieve”. Repositories are servers that have a set of packages. PPA is a collection of packages that are hosted on the Launchpad server. Adding PPA means adding a new repository to our system. We can install the application from that repository. PPA repositories are unofficial repositories that are used to connect third-party software to the Ubuntu operating system.

Ubuntu searches for the application in a package archive that contains most of the applications required by Ubuntu users. Still, newer versions of the same apps that are not as common are not always available in the official repository. A PPA repository can help with this.

Our system can have numerous repositories installed. The crowded archive of repositories can make the updating process very slow. Therefore, try to keep the required repositories on your system and delete the unwanted or damaged repositories.

Canonicals’ Launchpad platform allows developers to upload their code and publish it. Users can download deb packages and use them to install the app.

We have four ways to remove the PPA repository from the system:

  1. Remove PPA repository via GUI
  2. Remove PPA repository via terminal
  3. Remove PPA repository from source
  4. Remove PPA repository using purge

We will demonstrate to you how to safely uninstall the PPA repository in Ubuntu 20.04 in this post:

How to list all installed repositories:

To see a list of all the repositories installed on your system, copy the following command and paste it into the terminal:

$ apt policy

Alternatively, printing the content of the /etc/apt/sources.list.d is another way to get a list

$ ls /etc/apt/sources.list.d

We have different approaches to remove PPA repositories:

Remove PPA repository via GUI:

An Ubuntu UI feature assists you in handling both the Ubuntu official and PPA repositories.

Type “software & update” on the application search bar:

Go to the “Other Software” tab and pick the wanted PPA from the given list. After that, press “Remove” to get rid of it:

After that, the device will request for authentication. The selected PPA will be deleted from your device after you enter the password.

Remove PPA repository via terminal:

If you want to delete a PPA repository that has been added to your system, use the below-given command syntax:

$ sudo add-apt-repository --remove [ppa:ppa-file]

I want to remove the blender repository from Ubuntu:

Remove PPA from the source list:

You can also delete the PPA from the sources list, where all repositories are kept. To see all the PPAs installed on your device, run the command shown below:

$ sudo rm /etc/apt/sources.list.d/<ppa-file>

For example, I am removing PPA repository of “blender”:

$ sudo rm /etc/apt/sources.list.d/Thomas-schiex-ubuntu-blender-focal.list

Remove PPA repository using purge:

All of the approaches we have covered so far only work to eliminate the PPAs from the system. They do not uninstall the application that was installed through that specific PPA.

We will use the PPA purge utility in this approach, which removes the PPA repository and uninstall the application installed with it.

On Ubuntu, the PPA purge utility is not preinstalled. Type the showing command to install it:

$ sudo apt-get purge

Looking forward, consider the command syntax to purge the repository:

$ sudo ppa-purge ppa:<ppa-file>

For example:

$ sudo ppa-purge ppa:webupd8team/y-ppa-manager

Conclusion:

We add a PPA repository to install any application, but sometimes we want to remove that PPA repository. When we delete a package, the repository does not go away with it. In this post, we have seen different approaches to remove PPA repositories from Ubuntu 20.04. We can remove repositories through the GUI command line terminal using the sources list. The remove commands only delete the PPA from the system, but the “purge” removes both the application and repository from the system.



from Linux Hint https://ift.tt/3nLeggC

Post a Comment

0 Comments