How to find and remove obsolete PPA repositories on Ubuntu

Last updated on June 29, 2020 by Dan Nanni

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 trusty/main amd64 Packages  404  Not Found
Err trusty/main i386 Packages  404  Not Found
W: Failed to fetch  404  Not Found

W: Failed to fetch  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.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean