Learn why apt update fails with the Release file error on Ubuntu and Debian, how to find the broken repository entry, and how to fix it safely, including EOL releases and GPG key issues.
Prerequisites
- Sudo or root access to the server
- A working internet connection
- Basic familiarity with editing text files via the terminal
What this solves
The error E: The repository no longer has a Release file means apt found a sources.list entry pointing to a repository that no longer publishes a valid Release file at that path. This happens when a PPA is deleted, a mirror reorganizes its directory structure, or your distro version reaches end of life and gets pulled from the main mirror network.
This guide shows you how to identify the exact broken entry, remove or fix it safely, and handle the special case of EOL Ubuntu and Debian releases that need to point to archive servers instead.
Step-by-step configuration
Reproduce and read the full error
Run apt update and capture the full output. The error always includes the exact URL of the broken repository, which you need for the next steps.
sudo apt updateLook for a line similar to this in the output.
Err:3 http://ppa.launchpad.net/example/ppa/ubuntu jammy Release
404 Not Found
E: The repository 'http://ppa.launchpad.net/example/ppa/ubuntu jammy Release' no longer has a Release file.Understand why this happens
There are four common causes. A PPA maintainer deleted the PPA or stopped building for your release. A third-party repository shut down or moved domains. Your Ubuntu or Debian release reached end of life and was removed from the regular mirrors, since EOL releases only remain on archive servers. A mirror is mid-sync and temporarily missing the Release file, which is rare and usually resolves on its own within an hour.
lsb_release -a and compare the codename against the Ubuntu or Debian end-of-life schedule.Check if your release is end of life
Ubuntu standard releases are supported for 9 months, LTS releases for 5 years with optional ESM. Debian releases are supported until the next stable plus one year under LTS. If your release is past its support window, every one of its original mirror entries will fail, not just one.
cat /etc/os-releaseCompare the VERSION_CODENAME value against the current support table.
| Codename | Distro | Status |
|---|---|---|
| noble (24.04) | Ubuntu | Supported |
| jammy (22.04) | Ubuntu | Supported |
| focal (20.04) | Ubuntu | ESM only |
| bionic (18.04) | Ubuntu | EOL, archive only |
| bookworm (12) | Debian | Supported |
| bullseye (11) | Debian | Supported (LTS) |
| buster (10) | Debian | EOL, archive only |
Locate the problematic entry in sources.list
Repository entries live in two places on modern Ubuntu and Debian: the legacy sources.list file and individual .list or .sources files under sources.list.d. Search both for the URL from the error message.
grep -rn "ppa.launchpad.net/example" /etc/apt/sources.list /etc/apt/sources.list.d/On Ubuntu 24.04 you may also find entries in the newer deb822 format with a .sources extension.
cat /etc/apt/sources.list.d/ubuntu.sourcesList all configured repositories for a full audit
Before editing anything, get a complete picture of every active source so you do not miss a second broken entry.
grep -rhE '^deb |^Types: deb' /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/nullNote the filename of each entry that references the broken URL. You will edit or remove these files in the next step.
Disable or remove the stale repository safely
Do not delete working repositories blindly. Comment out or remove only the specific line that matches the failing URL, keeping a backup first.
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bakIf the broken entry is a PPA in its own file under sources.list.d, remove that file directly.
sudo rm /etc/apt/sources.list.d/example-ppa-ubuntu-jammy.listIf the entry is a single line inside sources.list, comment it out instead of deleting the whole file.
sudo sed -i 's|^deb http://ppa.launchpad.net/example/ppa/ubuntu|#deb http://ppa.launchpad.net/example/ppa/ubuntu|' /etc/apt/sources.listFix EOL Ubuntu releases by switching to old-releases.ubuntu.com
When an Ubuntu release goes end of life, packages move from the regular mirror network to a permanent archive. You need to repoint every archive.ubuntu.com and security.ubuntu.com entry to old-releases.ubuntu.com.
sudo sed -i 's|http://archive.ubuntu.com/ubuntu|http://old-releases.ubuntu.com/ubuntu|g; s|http://security.ubuntu.com/ubuntu|http://old-releases.ubuntu.com/ubuntu|g; s|http://.*.archive.ubuntu.com/ubuntu|http://old-releases.ubuntu.com/ubuntu|g' /etc/apt/sources.listVerify the change applied correctly before moving on.
grep deb /etc/apt/sources.listFix EOL Debian releases by switching to archive.debian.org
Debian follows the same pattern through its own permanent archive. Replace deb.debian.org and security.debian.org with archive.debian.org, and drop the -updates and security suites since the archive only keeps the final frozen state.
sudo sed -i 's|deb.debian.org|archive.debian.org|g; s|security.debian.org|archive.debian.org|g' /etc/apt/sources.listRemove lines referencing buster-updates or buster/updates since the archive does not serve update suites separately.
sudo sed -i '/buster-updates/d; /buster\/updates/d' /etc/apt/sources.listRe-add correct GPG keys with signed-by
If apt also reports NO_PUBKEY or a signature verification failure alongside the Release file error, the repository's GPG key is missing or was added using the deprecated apt-key method. Modern apt expects a keyring file referenced explicitly with signed-by.
curl -fsSL https://example.com/repo/gpg-key.asc | sudo gpg --dearmor -o /usr/share/keyrings/example-repo.gpgThen reference that keyring directly in the repository entry instead of relying on the global keyring.
deb [signed-by=/usr/share/keyrings/example-repo.gpg] https://example.com/repo stable mainOn Ubuntu 24.04 using the newer deb822 format, the equivalent entry looks like this.
Types: deb
URIs: https://example.com/repo
Suites: stable
Components: main
Signed-By: /usr/share/keyrings/example-repo.gpgClean apt's cache and refresh
After editing sources, clear stale package lists so apt rebuilds its cache from the corrected entries.
sudo rm -rf /var/lib/apt/lists/*
sudo apt clean
sudo apt updateVerify your setup
Confirm apt update completes without errors and that package information is current.
sudo apt update
apt-cache policy | head -n 20Check that no sources reference an unreachable host.
grep -rhE '^deb |^Types: deb' /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null | awk '{print $2}'Test connectivity to each listed host directly if you are unsure which one is still failing.
curl -I http://old-releases.ubuntu.com/ubuntu/dists/bionic/ReleaseCommon issues
| Symptom | Cause | Fix |
|---|---|---|
| 404 Not Found on Release file | Repository removed or PPA deleted | Remove the .list file under /etc/apt/sources.list.d/ |
| Error happens for every default mirror entry | Distro release is end of life | Switch to old-releases.ubuntu.com or archive.debian.org |
| NO_PUBKEY error alongside Release file error | Missing or expired GPG key | Download the key and reference it with signed-by |
| Works intermittently, fails on retry | Mirror is mid-sync | Wait 30-60 minutes or switch to a different mirror |
| Error only on arm64 or a specific architecture | PPA does not build for that architecture | Remove the PPA or find an architecture-matching alternative |
| apt-key: command not found or deprecated warning | Using the old key management method | Migrate to signed-by with a keyring file in /usr/share/keyrings/ |
Preventing recurrence
Audit third-party repositories periodically, since PPAs and vendor repos can disappear without notice. Before adding a new release's worth of PPAs after an upgrade, check whether the maintainer has published a build for your new codename.
Track your distro's end-of-life date and schedule an upgrade well before it hits, since EOL triggers this exact error across every default repository at once. If you manage several servers, consider centralizing cron-based system maintenance scheduling so apt updates and failures are caught early rather than discovered during a deployment. For monitoring disk impact from a bloated or broken apt cache, see checking disk space usage on Linux. If you are also tuning how packages get installed across apt, dnf, and yum, the Linux package management guide covers the broader workflow.
Next steps
- Configure automatic security updates with unattended-upgrades and email notifications
- Configure Linux package management with apt, dnf and yum for system updates
- Plan an Ubuntu LTS upgrade path and migration checklist
- Check disk space usage on Linux with df and du commands