How to remove PPA repository from command line on Ubuntu

Question: I added a third-party PPA repository on my Ubuntu box some time ago. How can I remove the PPA repository?

Suppose you have a third-party PPA repository added on your Ubuntu system.

$ sudo add-apt-repository ppa:webapps/preview

If you want to delete a PPA repository alone, run the following command.

$ sudo add-apt-repository --remove ppa:someppa/ppa

Note that the above command does not touch any packages installed or upgraded from the PPA itself.

If you want to delete a PPA repository as well as all packages installed/upgraded from the PPA, you can use ppa-purge command.

To install ppa-purge package:

$ sudo apt-get install ppa-purge

To remove a PPA repository and all its packages from the command line:

$ sudo ppa-purge ppa:webapps/preview

Subscribe to Ask Xmodulo

Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.

Leave a comment

Your email address will not be published. Required fields are marked *

Current ye@r *