
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:
Command: sudo apt-get dist-upgrade
Other Useful Tutorials –
- How To Reload Your Logstash Configuration File Automatically
- [Kali Linux] Live Host Identification with Netdiscover
- DNS Enumeration with DNSENUM To Find DNS Servers
- SSH Enumeration and Penetration Testing – A Brief Guide
- How to Install Winlogbeat in Windows OS
- [Tutorial] How to Install MobSF on Kali Linux 2022.1
- How To Install Jenkins on Ubuntu Machine
- [Tutorial] How To Install Webmin in Ubuntu
- How to Install Apache Tomcat on Ubuntu Machine
- A Step-by-Step Guide to Installing the LAMP Stack on Ubuntu