Home Ubuntu How to Remove a PPA in Ubuntu

How to Remove a PPA in Ubuntu

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
View Enabled PPA Repositories
View Enabled PPA Repositories

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
Ubuntu Repository Configuration Files
Ubuntu Repository Configuration Files

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 
Ubuntu PPA Configuration Files
Ubuntu PPA Configuration Files

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
Delete PPA in Ubuntu
Delete PPA in Ubuntu

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
Confirm PPA Repositories
Confirm PPA Repositories

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.

Conclusion

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.

Ravi Saive
I am an Experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies. Founder of TecMint.com, LinuxShellTips.com, and Fossmint.com. Over 150+ million people visited my websites.

Each tutorial at UbuntuMint is created by a team of experienced writers so that it meets our high-quality standards.

Was this article helpful? Please add a comment to show your appreciation and support.

Got something to say? Join the discussion.

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published or shared. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.