Fix Ubuntu 404 Not Found Error in Ubuntu apt-get update Command

Ubuntu 404 apt update error fix solution techhyme

Are you experiencing the following error when running apt update? On recent versions of Ubuntu, you may get the following error when trying to run apt-get update or apt-get install.

Usually, the reason for this error is changing locations of Ubuntu repositories. According to the versioning policies of Ubuntu, normal releases are supported for 9 months, whereas LTS (Long Term Support) releases are supported for 5 years.

After the support period has expired, the repository is moved to another server and will no longer be available in the standard location.

Ubuntu 404 apt update error techhyme

If you encounter it, the full error message and notice messages may look something like this.

E: The repository “———” no longer has a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

For example, the example output above indicates that the user is trying to install or update impish-backports on Ubuntu Impish, which the repository haven’t been updated to support. As such, its repositories can no longer be found on the mirrors, so if you want to continue using this version, you need to use old-releases.ubuntu.com as your mirror.

Be aware however, that there will be no more upgrades for Impish, so you might want to switch to a supported version. The easiest way to upgrade is to run this command: do-release-upgrade

Also Read: Ubuntu 21.10 (Impish Indri) End of Life reached on July 14 2022

To fix this 404 issue, you need to run the following two commands which will update your APT sources to use the “old-releases” versions of the packages.

Here are the commands:

sudo sed -i -r 's/([a-z]{2}.)?archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo sed -i -r 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

Ubuntu 404 apt update error techhyme

After that, you can run “apt update” and “apt upgrade” command.

Ubuntu 404 apt update error techhyme

The apt update command is now working as expected!

Ubuntu 404 apt update error techhyme

After successfully updating and upgrading the system. Type the command given below to install the Curl on your Ubuntu system.

Curl can be installed from the official APT package repository of the Debian Operating system.

Ubuntu 404 apt update error techhyme

Alternatively, you can also try to upgrade the Ubuntu version, which will update sources for apt-get as well. To update, run the following command:

Command: sudo apt-get dist-upgrade

Other Useful Tutorials –

Leave a Reply