What Is PPA And How To Add Or Remove It In Ubuntu Using Command Line?

In the context of the Linux operating system, PPA stands for “personal package archive”. By using PPA anyone can distribute software packages and update directly to the Ubuntu users. PPA makes it easy to add and remove software packages that are not available in apt repositories.

PPA allows one to upload Ubuntu source packages to be built and published as an apt repository by launchpad.net. This provides non-standard updates to Ubuntu users. To host your own package as PPA you need to create a source package and upload it to the launchpad it will build binaries and then host them in your own repository.

How to add a PPA?

You can add a PPA easily from your terminal. Here in this example, I will add an existing PPA of the grub customizer and then will install it. First, open the terminal by pressing Ctrl+Alt+T and then execute the below command –

sudo apt-add-repository ppa:danielrichter2007/grub-customizer

Once the repository gets added you can install the software by using the following command in the terminal –

sudo apt-get install grub-customizer

How To Remove a PPA?

There are various ways to remove a PPA. You can remove it by using the commands that are given below

sudo apt-add-repository --remove ppa:danielrichter2007/grub-customizer
[alert color=”yellow”]The above command will remove grub customizer PPA from  /etc/apt/sources.list.d and please note that this will not remove the package installed on your system. To remove PPA as well as the installed package, we will have to use the purge command that we will see ahead.[/alert]

The other way to remove it is by executing two commands that are given below –

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

And then look at desired PPA that you want to remove and then execute the following command –

sudo rm -i /etc/apt/sources.list.d/ppa-name.list
sudo rm -i /etc/apt/sources.list.d/danielrichter2007-grub-customizer-bionic.list
[alert color=”green”]Replace ppa-name with the PPA you intend to remove.[/alert]

How to use ppa-purge to remove a PPA and the installed application?

If you want to remove a PPA along with the application installed with it then you should use the ppa-purge. By default, you may not find it in many Ubuntu-based distributions so you can install it by using the following command –

sudo apt-get install ppa-purge

And then you can use it to remove a PPA by using the command that is given below-

sudo ppa-purge ppa-url

For Example: sudo ppa-purge ppa:danielrichter2007/grub-customizer

[alert color=”green”]You can find this URL in your system by navigating to sources.list.d[/alert]

Is it Safe to Install from any PPA?

[alert color=”red”]As the PPA enables anyone to host and distribute any software to anyone, obviously there could be a risk of reliability. It is important to keep in mind that a PPA can be harmful if it comes from untrusted sources.[/alert]

PPAs are used to include a specific software to your Ubuntu or other PPA compatible distributions such as Linux Mint, Kubuntu, etc. To use it safely in your system you should keep a few things in your mind.

  1. Who published the PPA? Please make sure that you are using the official PPA from a trusted publisher.
    – For example, the official PPA of LibreOffice i.e ppa:libreoffice/ppa would be considered more trusted than someone who created a similar PPA. The PPA from unknown sources can lead you to download corrupted and incompatible software that may harm your system.
  2. How many people have used the PPA? A number of users with good feedback can give you a sense of security and it can encourage you to use it.
    This can be used as a sign of security, but at the same time, you must be cautious to see other parameters of the PPA as well to measure the reliability.
  3. When was the PPA last updated? You should always use an updated PPA because if the package dependencies that PPA needs are very old and newer version changes so much code of it then it is also possible that this old package won’t work on your system and your system can crash after using it.

That’s all for now on adding, removing PPA. If you want to say something on this topic you can write to us in the comments below.

7 thoughts on “What Is PPA And How To Add Or Remove It In Ubuntu Using Command Line?”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version