How to find and remove obsolete PPA repositories on Ubuntu

Question: I was trying to re-synchronize package index files by running apt-get update. But I am getting the following "404 Not Found" errors. Looks like I cannot fetch the latest index from some third-party PPA repositories that I've added before. How can I clean up such broken and old PPA repositories?
Err http://ppa.launchpad.net trusty/main amd64 Packages  404  Not Found
Err http://ppa.launchpad.net trusty/main i386 Packages  404  Not Found
W: Failed to fetch http://ppa.launchpad.net/finalterm/daily/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/finalterm/daily/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

When you attempt to update APT package indexes, "404 Not Found" errors can often happen after distro upgrade. That is, after you upgraded your Ubuntu release, some third-party PPA repositories which you added on the old release are no longer supported on the upgraded release. In that case, you can identify and purge those broken PPA repositories as follows.

First, find out the PPAs which cause "404 Not Found" failures.

$ sudo apt-get update | grep "Failed"

In this example, the PPA repository which is no longer supported in Ubuntu Trusty is "ppa:finalterm/daily".

Go ahead and remove the PPA repository.

$ sudo add-apt-repository --remove ppa:finalterm/daily

You have to repeat this process for every obsolete PPA repository that you found from above.

After removing all obsolete PPA repositories, re-run "apt-get update" to check all of them have been successfully removed.

Download this article as ad-free PDF (made possible by your kind donation): 
Download PDF

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.


Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

3 thoughts on “How to find and remove obsolete PPA repositories on Ubuntu

  1. Thank you for your guide, it worked for me. This article must be pointed as reference in stackoverflow. There are many people who triying to solve this issue.

  2. Very helpful article, Thank You! In my case, I do sudo add-apt-repository --remove to work.

Leave a comment

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