
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
- Top 26 Essential Windows Commands for Network Enumeration
- Top 7 Nmap Commands for Effective Network Scanning
- Tool Categories in Kali Linux – A Brief Overview
- 100+ Important Linux Terms and Technologies
- How to Use Kali Linux for OSINT Automation
- How to Perform Network Security Audits Using Kali Linux
- How to Harden Kali Linux for Maximum Security
- How to Use Kali Linux for Cloud Security Testing
- How to Fix Common Kali Linux Installation Errors
- How to Use Python for Ethical Hacking in Kali Linux