About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
When apt-get update says The repository '...' no longer has a Release file. or The repository '...' does not have a Release file., apt asked a server for the signed index of one repository and got nothing usable. The URL and suite in the message tell you which source entry failed. Check that entry first: a Debian release that has moved to the archive, a mistyped suite, or a third-party repository that changed its address are possible reasons.
What the error means
The apt-secure manual says that "If an archive has an unsigned Release file or no Release file at all current APT versions will refuse to download data from them by default in update operations". A Release file (or the signed form, InRelease) is the index that lists every package file in a repository. Without it apt cannot verify anything, so it refuses to use the repository.
The two wordings come from apt's source code, not from a manual page. At tag 2.6.1, apt-pkg/acquire-item.cc holds the formats The repository '%s' no longer has a Release file. and The repository '%s' does not have a Release file. In both, %s is replaced by the repository's address and suite, which is the part that varies. The code chooses "no longer has" when apt already holds an earlier signed copy of that repository's Release information (a Release.gpg or InRelease file) from a previous update. It chooses "does not have" when there is no such earlier copy. So:
- "no longer has" means apt still holds a Release.gpg or InRelease file from an earlier update of this source, and the server no longer serves one.
- "does not have" means apt holds no such earlier file for it: a new entry, a wrong URL, a wrong suite, or a source whose stored lists were cleared.
After the error apt also prints notices saying that updating from such a repository "can't be done securely, and is therefore disabled by default" and pointing at apt-secure(8). That notice is apt refusing, as designed.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| A Debian release has left the main mirror and now lives in the archive | The message names a Debian URL and an old codename; "no longer has" on a machine that updated fine before | Debian's release table lists the codename as archived; the Distribution Archives page lists it under archive.debian.org |
| The suite or codename in the entry is wrong | "does not have", and the suite in the message is not a real one | Compare the suite in the message with VERSION_CODENAME in /etc/os-release and the suite names on the repository's own page |
| A third-party repository changed its address or dropped the suite | One vendor URL fails; all Debian or Ubuntu sources update fine | The vendor's current instructions show a different URL or suite |
| The URL path is wrong | "does not have" for a new entry | The repository base URL plus dists/SUITE/InRelease returns an error status |
| An Ubuntu release is past its support dates | Ubuntu sources fail on a machine nobody has upgraded | Canonical's release cycle page lists the release with its standard security maintenance end date |
Prove the cause before changing anything
1. Read the exact failing line. apt-get update only refreshes the local package lists. Note the URL and the suite in each failing message:
apt-get update
2. Read the source entries. The sources.list manual says the list is /etc/apt/sources.list plus the files in /etc/apt/sources.list.d/, in one-line form (.list) or deb822 form (.sources):
cat /etc/apt/sources.list
ls /etc/apt/sources.list.d/
Open the file that contains the failing URL. The URI is the base of the archive, and the suite follows it.
3. Read the release codename of the machine.
cat /etc/os-release
The os-release manual describes VERSION_CODENAME as "identifying the operating system release code name" and gives buster as an example value.
4. Ask the server. The manual for curl says -I fetches "the headers only" and -s silences the progress meter. The Distribution Archives page says releases are stored "by their codenames under the dists/ directory". Substitute the URL and suite from the message:
curl -sI http://deb.debian.org/debian/dists/buster/InRelease
An HTTP error status (a 404, for example) means the server really has no such file at that address. A success status means the address is served, so look at the other causes in the table.
5. Check the release status. For Debian, read the release table at debian.org/releases. The table lists Buster with end of life 2022-09-10 and the status "Archived release, under third-party paid extended LTS support". For Ubuntu, read Canonical's release cycle page, which says LTS releases receive "5 years of standard security maintenance". Check the current pages; dates change.
Fix
Choose by cause. A release that has left the main mirror is a signal that the system is past its support dates. Debian's release table lists Buster as an archived release under third-party paid extended LTS support, so the real fix is a planned upgrade to a supported release.
Correct the source entry
Applies to a moved Debian release, a wrong suite, a wrong URL and a changed third-party address.
First save the current source files:
cp -p /etc/apt/sources.list /etc/apt/sources.list.2026-11-22
cp -a /etc/apt/sources.list.d /root/apt-sources.list.d.2026-11-22
The cp manual describes -p as "same as --preserve=mode,ownership,timestamps" and -a as "same as -dR --preserve=all". Some systems keep their sources only in .sources files under /etc/apt/sources.list.d. If cp reports that /etc/apt/sources.list does not exist, nothing needs saving for that file, and you edit only the file under /etc/apt/sources.list.d that holds the failing line (the saved directory is the copy to restore from, and apt never reads it).
Risk: the next edit changes which servers this machine downloads packages from. A wrong entry makes later apt-get install and apt-get upgrade runs fail or fetch from an unintended source.
Edit the failing line with your editor and keep the rest of the file as it is. In a .sources stanza, change the URIs: and Suites: fields instead; the sources.list manual shows the deb822 form with Types:, URIs: and Suites:. For a Debian release that has moved, the Distribution Archives page gives the form of the entry. Its example is deb http://archive.debian.org/debian/ hamm contrib main non-free, so for buster the entry becomes:
deb http://archive.debian.org/debian/ buster main
For a wrong suite, put in the suite the repository publishes. For a third-party repository, use the address and suite from the vendor's current instructions. To switch an entry off instead, the sources.list manual says "a # character anywhere on a line marks the remainder of that line as a comment", so a # at the start of the line disables a one-line entry. For a .sources file the manual says to add the field "Enabled: no".
Then run the update:
apt-get update
To back out: if you edited /etc/apt/sources.list and the save above succeeded, put the saved file back under its original name and update again. Run the first command only if /etc/apt/sources.list.2026-11-22 exists:
cp -p /etc/apt/sources.list.2026-11-22 /etc/apt/sources.list
apt-get update
If you edited a file under /etc/apt/sources.list.d, restore it from the saved directory with its own file name in place of NAME.sources (use the real file name, which may end in .list), then update again:
cp -p /root/apt-sources.list.d.2026-11-22/NAME.sources /etc/apt/sources.list.d/NAME.sources
apt-get update
Restoring the old entry brings back the original error, which is the state you started from.
Do not override the refusal
The apt-secure manual says "insecure repositories are strongly discouraged and all options to force apt to continue supporting them will eventually be removed". The options exist (Acquire::AllowInsecureRepositories, allow-insecure=yes), but they remove the check that protects a server from a tampered mirror. No command for them is given here.
Example (illustrative): web01 runs Debian 10 (buster) and has the single line deb http://deb.debian.org/debian buster main in /etc/apt/sources.list. After years of working updates, apt-get update now prints The repository ... no longer has a Release file. with the URL http://deb.debian.org/debian and the suite buster. The word "no longer" says apt held a signed copy before, so the entry did work. cat /etc/os-release shows VERSION_CODENAME=buster. curl -sI http://deb.debian.org/debian/dists/buster/InRelease returns an error status, and Debian's release table lists Buster as archived. The engineer saves /etc/apt/sources.list, changes the line to deb http://archive.debian.org/debian/ buster main, and apt-get update completes. The engineer then schedules an upgrade to a supported release, because Debian lists Buster's end of life as 2022-09-10.
Confirm the fix
apt-get updatefinishes with no Release-file message for the entry you changed.- No other source entry on the machine now fails.
- If you moved a release to the archive, record the date and the reason in the server's change record, with the planned upgrade date.
What to watch afterwards
- Add the end-of-life date of the operating system release to your calendar. The Debian release table lists the release, end-of-life and LTS dates for each release.
- After any source change, run
apt-get updatestraight away and read the output rather than waiting for the nightly job. - Keep third-party repositories to those whose vendor publishes a current URL and suite, and check the vendor's notes before each operating system upgrade.
Read next
Related articles you may want next.
- Troubleshootingapt NO_PUBKEY: "The following signatures couldn't be verified because the public key is not available"apt update shows NO_PUBKEY or signatures couldn't be verified? Find the missing key ID, fetch the vendor key safely and use Signed-By, not apt-key.Read article
- Troubleshooting"Could not get lock /var/lib/dpkg/lock-frontend": find the process holding itapt says Could not get lock /var/lib/dpkg/lock-frontend? Find the process holding it, wait for unattended upgrades and never delete the lock file.Read article
- Troubleshooting/boot is full and the kernel update will not install: remove old kernels the safe wayKernel update fails, /boot is full? Check df, keep the running kernel, remove old kernels with apt or dnf, and fix the half-installed package.Read article
Risks and limits
- These commands have not been run or lab-tested.
- Debian's release table lists Buster as an archived release under third-party paid extended LTS support only.
- A repository in the archive may also fail a validity check. The sources.list manual says that "some repositories such as historic archives are not updated any more by design", so the
Check-Valid-Untilcheck can be disabled for such a source. That check exists to detect replay attacks, so turning it off weakens the protection; no command for it is given here. - The Debian archive page documents the main archive. Security-suite entries for an archived release are not covered by it.
- Canonical's release cycle page lists support dates; it does not describe where an ended Ubuntu release is served from, so the Ubuntu cause is limited to checking the dates.
- apt-secure(8) and sources.list(5) are quoted for apt 2.6.1; newer apt versions are not covered.
Sources
- apt-secure(8) — Debian manpages, apt 2.6.1 (bookworm), source updated 2023-05-25, accessed 22 November 2026
- sources.list(5) — Debian manpages, apt 2.6.1 (bookworm), source updated 2023-05-25, accessed 22 November 2026
- apt-pkg/acquire-item.cc at tag 2.6.1 — Debian apt source code at a fixed tag, no date shown, accessed 22 November 2026
- Debian releases — debian.org, last modified 19 November 2026, accessed 22 November 2026
- Debian Distribution Archives — debian.org, last modified 4 July 2026, accessed 22 November 2026
- Ubuntu release cycle — Canonical, no date shown, accessed 22 November 2026
- os-release(5) — systemd 262 development manual page, no manual date shown, accessed 22 November 2026
- curl manual — curl project, no date shown, accessed 22 November 2026
- cp(1) — GNU coreutils 9.11 manual page, April 2026, accessed 22 November 2026
This article was originally published on .