Home › Linux & shell

E: The repository does not have a Release file. (Linux) — how to fix

E: The repository 'http://archive.ubuntu.com/ubuntu impish Release' does not have 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.

Quick fix: Check which line fails. For an end-of-life Ubuntu release, point sources at old-releases: sudo sed -i -E 's/([a-z]{2}[.])?(archive|security)[.]ubuntu[.]com/old-releases.ubuntu.com/g' /etc/apt/sources.list, run sudo apt update, then upgrade to a supported release. For a PPA or vendor repo, remove it from /etc/apt/sources.list.d/ (or sudo add-apt-repository --remove ppa:owner/name) or fix the codename.

What it means

Each repository line in your apt sources combines a URL and a release codename (jammy, noble, bookworm, ...). apt downloads <url>/dists/<codename>/Release. This error means that file doesn't exist at that URL. apt then disables that repository, so packages from it can't be installed or updated.

Find out which repository fails and what release you're on:

sudo apt update 2>&1 | grep -i "release file"
lsb_release -cs            # your codename
cat /etc/os-release

Cause 1: your release is end of life

Ubuntu removes non-LTS releases from archive.ubuntu.com some time after support ends (e.g. impish 21.10, kinetic 22.10, lunar 23.04) and moves them to old-releases.ubuntu.com. Old Debian releases such as stretch move to archive.debian.org. Every line for your release then fails, including the security repo.

Fix 1

To get apt working again on Ubuntu, switch the mirrors to old-releases:

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

On Debian, replace deb.debian.org and security.debian.org lines with archive.debian.org, e.g.:

deb http://archive.debian.org/debian stretch main
deb http://archive.debian.org/debian-security stretch/updates main

An EOL system receives no security updates. Use this to install what you need for the upgrade, then move to a supported release:

sudo apt install update-manager-core
sudo do-release-upgrade

Cause 2: a PPA or vendor repository doesn't support your release

After upgrading the OS (or on a brand-new release), PPAs and vendor repositories may not have published packages for the new codename yet, or ever. Only that one line fails.

Fix 2

Remove or disable the repository:

ls /etc/apt/sources.list.d/
sudo add-apt-repository --remove ppa:owner/name
# or delete / rename the file:
sudo rm /etc/apt/sources.list.d/owner-ubuntu-name-noble.list
sudo apt update

If the vendor supports an older codename only, you can sometimes point the line at that codename (e.g. jammy on noble), but packages built for another release may not install cleanly. Check the vendor's install instructions first.

Cause 3: the wrong codename in a manually added line

Copy-pasted instructions often contain a codename for a different distro. Linux Mint, Pop!_OS and elementary have their own codenames, but Ubuntu repositories only know Ubuntu's. Writing $(lsb_release -cs) on Mint produces a Mint name that the Ubuntu-based repo doesn't have.

Fix 3

Use the underlying Ubuntu codename. On Mint and other derivatives, /etc/os-release contains UBUNTU_CODENAME:

. /etc/os-release && echo "$UBUNTU_CODENAME"

Then edit the repository line in /etc/apt/sources.list.d/ to use it.

Cause 4: a typo, proxy or mirror problem

A mistyped URL, a mirror that is out of sync, or a proxy returning an HTML error page can all make the Release file "missing".

Fix 4

Open the Release URL in a browser or with curl to see what the server actually returns:

curl -I http://archive.ubuntu.com/ubuntu/dists/noble/Release

Switch to the main archive or another mirror if your local mirror fails. On Ubuntu 24.04 and later, the default sources are in /etc/apt/sources.list.d/ubuntu.sources (deb822 format) rather than /etc/apt/sources.list, so apply the mirror change there.

Last updated 2026-11-30.