PPA (Personal Package Archive) is a way of software distribution in Ubuntu for non-standard software, i.e. software not approved for official Ubuntu repositories.
Non-standard software may use methods like providing an installation Bash script, which configures and installs the software. However, this proves to be a burden for dependency management. With a PPA, dependencies are managed easily and software can be installed with a simple ‘apt install‘ command.
PPA’s often update to newer repositories or become invalid after a time. In any case, there are few simple steps to be performed to remove a PPA which is no longer required.
Listing Ubuntu Repositories
The list of repositories, both standard and PPA, is maintained in configuration files called Source files, in Ubuntu. When you run the ‘sudo apt update‘ command you can see the URLs to the repositories in the log.
$ sudo apt update
Here, the URLs with ‘ppa.launchpad.net‘ are the PPA repositories.
The configuration files are available in the ‘/etc/apt/‘ directory.
$ cd /etc/apt $ ls
Here, the file ‘sources.list‘ contains standard Ubuntu repositories, while PPA source files are available in folder ‘sources.list.d‘.
$ cd sources.list.d $ ls
Remove PPA in Ubuntu
There is one source file in this directory; which defines a repository for unofficial PPA for PHP installation. We simply need to delete this file in order to remove the PPA.
$ sudo rm ondrej-ubuntu-php-groovy.list $ ls
The PPA source file has been deleted.
Let’s now run the apt update again to confirm if the PPA repositories are indeed not getting considered.
$ sudo apt update
The PPA repository is not getting considered now as its deleted.
To add this PPA again, the user has to make use of the ‘add-apt-repository‘ command.
In this article, we have seen how to remove a PPA in Ubuntu. It is recommended that software from standard Ubuntu repositories be used instead of non-official software.
In cases when certain required software is not available, PPAs offer more security than simply downloading and installing something from the Internet.