![Ubuntu 404 apt update error fix solution techhyme](https://techhyme.com/wp-content/uploads/2022/09/Ubuntu-404-apt-update-error-fix-solution-techhyme-1024x567.jpg)
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.
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
After that, you can run “apt update” and “apt upgrade” command.
The apt update command is now working as expected!
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.
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:
You may also like:Command: sudo apt-get dist-upgrade
- Essential Commands For Process Management in Kali Linux
- How To Install Python 2.7.18 From The Source
- How To Parse SSH Authentication Logs with Logstash
- A Comprehensive Guide to File System Commands in Linux
- Essential File Compression Commands in Linux
- Secure Shell (SSH) Protocol – A Comprehensive Guide
- Monitoring Active Connections in Kali Linux Using Netstat
- How To Easily Crack Wi-Fi Password
- 6 Most Useful Windows Command Prompt Commands
- Ripgrep – Searching for Specific File Types and Beyond