Add or Remove PPA Repositories on Ubuntu

On Linux systems, packages to install are normally available via the sources.list file. But you can find some packages which are not maintained by the team of your official Linux system. This article will show you how to remove and add PPA on Ubuntu 18.04 systems.

There are some teams around the world who develop applications they make available to users through their personal repositories called personal packages archives (PPA). You have to follow a specific procedure to add them to your system.

What is PPA?

PPA are unofficial repositories of software packages made available to all through the LaunchPad platform developed and maintained by Canonical. Developers who want to make their work available to Ubuntu users deposit their source code on this site. Launchpad then builds .deb packages for the different versions of Ubuntu that users can then install through their software package manager. It exists some methods to install or remove PPA on Ubuntu systems.

Disable Automatic Updates for cPane...
Disable Automatic Updates for cPanel | Turn-off Automatic Updates - Make Money Online Course Part 9

Using the terminal

a) Add PPA

To add the PPA through the terminal, we use the add-apt-repository command which adds a PPA repository to your package manager's configuration.

On Ubuntu 18.04, after adding the ppa, you can directly install the package because the command launches the update process so the syntax is as below

add-apt-repository ppa:ppa_name
apt install package_name

On Ubuntu 16.04 and earlier, you need to update the package manager then, install the package that you need

add-apt-repository ppa:ppa_name
apt update
apt install package_name

You can need to download the keyserver of a package during the process, so if need, use the command below

# apt-key adv --keyserver --recv-keys key_value

When you add a PPA on your system, it will create the ppa file in the /etc/apt/sources.list.d directory

Note: You should notice that when you add a repository, the apt update command can take longer and longer time as if like non-Ubuntu repositories are not as fast or don't have as much band.

b) Remove ppa

There are 3 ways to remove PPA from terminal:

  • ppa-purge command: purge all traces of the use of a PPA repository. The command also tries to replace the installed packages with the version of the Officially Ubuntu Repositories. It is not present by default so you need to install it.
# apt install ppa-purge
# ppa-purge ppa:ppa_name

You can follow the example below

# ppa-purge ppa:sebastian-stenzel/cryptomator
Updating packages lists
PPA to be removed: sebastian-stenzel cryptomator
Package revert list generated:
Disabling sebastian-stenzel PPA from 
Updating packages lists
The following packages will be REMOVED:
  • The add-apt-repository --remove command: to delete a PPA repository with the associated packages
add-apt-repository --remove ppa:name_ppa

You can try to follow the example below

# add-apt-repository --remove ppa:stephenczetty/gerbera
  More info:
Press [ENTER] to continue or ctrl-c to cancel removing it
  • Manually remove As we mentioned earlier, the ppa repositories are added into a specific folder. So you can delete the ppa contained in the /etc/apt/sources.list.d/ folder
rm /etc/apt/sources.list.d/ppa_name

The example below deletes PPA on Ubuntu 16.04

# rm /etc/apt/sources.list.d/cubic-wizard-ubuntu-release-xenial.list

Using the GUI method

a) Add PPA

You can use the graphical method to add and remove PPA on Ubuntu systems. You just have to search for Software & Updates, go to Other Software tab and click on Add button to add a new PPA.

You can see the result

b) Remove PPA

To remove a particular PPA, you just need to select it from the list as shown and click on Remove button. You will be prompted for the password

How to List PPA's

You can list the PPA in your system with the command below

# grep ^ /etc/apt/sources.list.d/*
/etc/apt/sources.list.d/bitcoin-ubuntu-bitcoin-xenial.list:deb xenial main
/etc/apt/sources.list.d/bitcoin-ubuntu-bitcoin-xenial.list:# deb-src xenial main
/etc/apt/sources.list.d/ xenial main
/etc/apt/sources.list.d/ deb-src xenial main
/etc/apt/sources.list.d/ xenial main

You can also use the script below

# vim

#! /bin/bash
for X in /etc/apt/sources.list.d/* 
  cat $X
  echo -e "** $X **\n"

Then you can run it

# ./
deb xenial main
# deb-src xenial main
** /etc/apt/sources.list.d/bitcoin-ubuntu-bitcoin-xenial.list **

deb xenial main
# deb-src xenial main
** /etc/apt/sources.list.d/ **

deb xenial main
# deb-src xenial main
** /etc/apt/sources.list.d/ **


Now you exactly know the different ways to add and remove PPA on your Ubuntu systems. By activating these PPA filings, you acknowledge trusting their authors. The PPA repositories may contain multiple software that may depend on several updated libraries. So, it is possible that the installation of these updates may have an impact on the stability of your Ubuntu system.

Read also:

Leave a Comment