How to Fix Ubuntu/Debian apt-get 404 Not Found Repository Errors

Distribution Upgrade

The most simple solution is to upgrade your Ubuntu instance to the newest release:

if the distribution upgrade is not an option right now, you can update the sources url for the Ubuntu repositories to find the old packages.

Update Packages Url

You can use the sed command to update the sources in /etc/apt/sources.list file to the new location for old package repositories2.

Run the following command to update and package repository4 URLs with Since the normal Ubuntu releases link to the archive and security URLs, the support will be removed after their live cycle of 9 months and respective repositories3 moved to

To check whether there are other files in /etc/apt/sources.list.d/ which need to be updated, use the following grep command.

That’s it. Now you can update your sources again.