Fix apt update E: Repository no longer has a Release file

Beginner 15 min Oct 25, 2026
Ubuntu 24.04 Ubuntu 22.04 Debian 12 Debian 11

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 update

Look 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.

Note: Check your release status before assuming the repository is at fault. Run 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-release

Compare the VERSION_CODENAME value against the current support table.

CodenameDistroStatus
noble (24.04)UbuntuSupported
jammy (22.04)UbuntuSupported
focal (20.04)UbuntuESM only
bionic (18.04)UbuntuEOL, archive only
bookworm (12)DebianSupported
bullseye (11)DebianSupported (LTS)
buster (10)DebianEOL, 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.sources

List 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/null

Note 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.bak

If 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.list

If 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.list
Warning: Never run apt-add-repository --remove blindly across your whole sources list. Target the exact line or file identified in the error so you do not accidentally disable repositories you still need.

Fix 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.list

Verify the change applied correctly before moving on.

grep deb /etc/apt/sources.list

Fix 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.list

Remove 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.list
Note: EOL archives are read-only snapshots. You will no longer receive security patches on an EOL release. Plan a migration to a supported version as soon as possible.

Re-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.gpg

Then 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 main

On 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.gpg
Warning: Avoid apt-key add, it is deprecated and removed in recent Ubuntu and Debian releases. Always use a dedicated keyring file with signed-by so each repository's trust is scoped to its own key, not the whole system.

Clean 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 update

Verify your setup

Confirm apt update completes without errors and that package information is current.

sudo apt update
apt-cache policy | head -n 20

Check 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/Release

Common issues

SymptomCauseFix
404 Not Found on Release fileRepository removed or PPA deletedRemove the .list file under /etc/apt/sources.list.d/
Error happens for every default mirror entryDistro release is end of lifeSwitch to old-releases.ubuntu.com or archive.debian.org
NO_PUBKEY error alongside Release file errorMissing or expired GPG keyDownload the key and reference it with signed-by
Works intermittently, fails on retryMirror is mid-syncWait 30-60 minutes or switch to a different mirror
Error only on arm64 or a specific architecturePPA does not build for that architectureRemove the PPA or find an architecture-matching alternative
apt-key: command not found or deprecated warningUsing the old key management methodMigrate 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

Running this in production?

Want this handled for you? This works for a single server. When you run multiple environments or need apt sources, GPG keys and EOL migrations managed consistently across a fleet, keeping it healthy is a different job. See how we run infrastructure like this for European teams.
#apt #ubuntu #debian #package-management #troubleshooting

Don't want to manage this yourself?

We handle infrastructure for businesses that depend on uptime. Fully managed, with one fixed contact who knows your setup.

You get one fixed contact who knows your setup

Rotterdam 12:03 · reachable in a message, no ticket form