Add or Remove PPAs in Ubuntu

In this article, we would discuss how to Add or Remove PPAs in Ubuntu distribution with relevant examples. PPA is an acronym for Personal Package Archive. This route is available for those developers who do not want to distribute their packages through Ubuntu’s main repository. For users, it is better than downloading and installing a package from unknown sources.

When compared to the packages available in standard Ubuntu repository, users have to settle with less security when they install packages through unverified PPAs. This, moreover, implies that these packages have not gone through the Ubuntu package validation checks. But, it should also not be construed as if the PPA developer would behave mischievously. Whether to go with installation of the package is left to users’ discretion.

Furthermore, when users add packages through PPAs they allow the package developers to update their packages just like any other package available in standard Ubuntu repository.

Also, the operations discussed below would require you to have superuser privileges. Contact your System Administrator for assistance in case you don’t have one.

Through add-apt-repository command we are adding the repository to /etc/apt/sources.list file.

Add PPAs in Ubuntu

There are two methods available to us for adding PPAs in our distribution. Besides, location of PPA is a prerequisite to its addition and removal.

First, through uri. Run the following in terminal –

sudo add-apt-repository 'deb uri distribution [component] [..]'

For instance,

sudo add-apt-repository 'deb http://<domain-name>/<distribution>/ component1 component2'

Second, through PPA name –

sudo add-apt-repository ppa:<ppa_name>

To reflect the changes we just made, source list file needs to be updated. Hence, don’t forget to run the following in terminal –

sudo apt update

Now, we can install and remove packages available with the repositories.

Remove PPAs in Ubuntu

Just as we could add a repository through add-apt-repository command. To remove a repository, we need to pass – – remove option with the command.

sudo add-apt-repository --remove 'deb uri distribution [component] [..]'
sudo add-apt-repository --remove ppa:<ppa_name>

For instance,

sudo add-apt-repository --remove 'deb http://<domain-name>/<distribution>/ component1 component2'

Thereafter, update the source list through the command –

sudo apt-update

Note: Merely removing a repository would not remove the packages which were installed through repository.

In conclusion, we have discussed how to Add or Remove PPAs in Ubuntu distribution.

Similar Posts