Coding Agents & Terminal · recorded 2026-08-29 · applies to 1 tool(s) ✓ Verified

Problem: apt-get update fails with 404 Not Found / broken source (Err:1 ... 404) —— Trove problem library

Verified 2026-08-29apt-get update 404 means a dead source — locate the bad entry from the Err: line, verify with curl, then remove/comment it and update again.

Quick fix

# One-liner: locate the bad entry (look at the Err: line), curl-verify it, remove/comment it, then re-update
grep -r "^deb" /etc/apt/sources.list /etc/apt/sources.list.d/ && curl -sI <URIs>/dists/<suite>/Release

What you will run into

apt-get update / apt-get install reports a broken source: Err:2 https://deb.debian.org/debian nonexistent-suite Release 404 Not Found, ending with E: The repository ... does not have a Release file. and exit code 100. You changed nothing, so why did it suddenly break?

Most likely one of the sources is down - apt-get update is the "fetch the index" stage, and any single failed source makes the whole command exit 100, even when the others are fine.

Why this happens

apt reports 404 + no Release file when the repository a source points to no longer serves dists/<suite>/Release:

ScenarioNotes
Source URL deadProject stopped maintaining the deb repo, domain expired, path changed
Suite name typo / nonexistentbookworm written as bookworm2, or pointing at an unreleased/archived suite
Copied from an old tutorialRepo deleted after publication - the most common way people get hit
Mirror partially syncedmain present but universe missing, or an interrupted fetch left a half-done tree

apt's addressing model is path composition of "source entry → suite → component → Release/index files": deb http://host/dists/<suite>/<component> maps to dists/<suite>/Release (plus Packages/Sources indexes).

404 + "no Release file" means the server no longer serves files at that path — it is not "bad network", it is "the addressed target does not exist".

Partially-synced mirrors, a mistyped suite name, and a decommissioned repo all land on the same layer.

Deterministic takeaway: the URL in the error is exactly what apt requested — verify existence manually with curl -I; a 404 during apt-get update affects only that source's component while others keep working (so "some sources broken" is the norm);

the fix is editing the source entry (/etc/apt/sources.list or /etc/apt/sources.list.d/), not re-running update repeatedly; fixed diagnostic: curl -I <error URL> returning 404 = dead source;

200 = check local list cache/proxy.

Step by step

1. Find which source is down — Required

Read the Err: lines in the full update output (repo URL + suite), then cross-check the entries:

grep -r "^deb" /etc/apt/sources.list /etc/apt/sources.list.d/

(For deb822 format, look at the Types:/URIs:/Suites: lines.)

2. Verify the source is actually reachable — Required

curl -sI <URIs>/dists/<suite>/Release

200 = the source is fine; 404 = the entry is dead.

3. Remove or comment out the bad entry — Required

rm /etc/apt/sources.list.d/bad.list

Or comment it out, then re-run apt-get update.

4. Switch to a valid source — Required

Ubuntu official: http://archive.ubuntu.com/ubuntu/; Debian: https://deb.debian.org/debian/; in CN, switch to Tsinghua/Aliyun mirrors (same path structure, suite names unchanged).

Do not use sources from old tutorials - curl-verify before writing them in.

5. Dead PPA / too-old release — Required

When an old PPA is cleaned up by Launchpad it 404s - delete the matching /etc/apt/sources.list.d/<ppa>.list; after a release reaches EOL the official sources retire, so upgrade the release or use old-releases.ubuntu.com (temporary only).

How to confirm it works

update is fully green (measured output shape):

apt-get update
-> no Err: lines, exit 0 (measured apt-exit=0 after removing the bad source)

Other environments

EnvironmentNotes
Local 404 serverSame Err: ... 404 File not found + exit 100 (measured repro)
Mirror expiredSwitch to Tsinghua/Aliyun; suite names unchanged
PPA discontinuedDelete the matching .list
EOL releaseUpgrade, or old-releases (temporary)
Exit code 100Any single failed source does this; locate the Err: line first

Symptom

apt-get update / apt-get install reports a broken source:

Err:2 https://deb.debian.org/debian nonexistent-suite Release
  404  Not Found [IP: 151.101.90.132 443]
E: The repository 'https://deb.debian.org/debian nonexistent-suite Release' does not have a Release file.

Signs: Err:N ... 404 Not Found (or File not found) during the update stage, finally E: The repository ... does not have a Release file; apt-get exit code 100. Common: third-party custom deb source went offline/its path changed, PPA discontinued (old PPAs cleaned from Launchpad), mirror expired / component name typo, retired official sources of old Ubuntu releases (e.g. the old archive.ubuntu.com paths from the 12.10 era), leftover bad entries in /etc/apt/sources.list.d/.

Cause

When the repository a source (sources.list / sources.list.d/*.sources) points to no longer serves dists/<suite>/Release, apt reports 404 + no Release file. Possible causes:

  • The source URL itself is dead (project stopped maintaining the deb repo, domain expired, path changed);
  • Suite name typo or nonexistent (e.g. bookworm written as bookworm2, or pointing at an unreleased/archived suite);
  • The source came from an old tutorial and the repo was deleted after publication (the most common way people get hit);
  • The mirror only synced part of the components (main present, universe missing), or a network interruption left a half-done tree.

Note: apt-get update is the "fetch the index" stage - any single failed source makes the whole command exit 100, even when the others are fine.

Solution

  1. Locate which source is down: read the Err: lines in the full update output (repo URL + suite), then grep -r "^deb" /etc/apt/sources.list /etc/apt/sources.list.d/ (for deb822, look at the Types:/URIs:/Suites: lines) to cross-check entries.
  2. Verify the source is actually reachable: curl -sI <URIs>/dists/<suite>/Release - 200 means the source is fine, 404 means the entry is dead.
  3. Remove or comment out the bad entry: move the dead .list/.sources out of the directory (rm /etc/apt/sources.list.d/bad.list) or comment it out, then re-run apt-get update.
  4. Switch to a valid source: Ubuntu official http://archive.ubuntu.com/ubuntu/ (Debian: https://deb.debian.org/debian/); in CN, switch to Tsinghua/Aliyun mirrors (same path structure, suite names unchanged); don't use "sources from old tutorials" - curl-verify before writing them in.
  5. Discontinued PPA: old PPAs added via add-apt-repository 404 after Launchpad cleanup - just delete the matching /etc/apt/sources.list.d/<ppa>.list.
  6. Too-old release: after EOL the official sources retire (404) - upgrade the release or use old-releases.ubuntu.com (temporary only).
Verification Evidence
  • Local measurement (2026-08-29, WSL Ubuntu, apt 2.x, isolated temp sources via -o Dir::Etc::sourcelist=..., system config untouched):
  • Bad source 1: deb https://deb.debian.org/debian/ nonexistent-suite main -> update reports Err:2 ... nonexistent-suite Release 404 Not Found, E: does not have a Release file, apt-exit=100;
  • Bad source 2: local 404 server (python3 -m http.server returning only 404) -> same Err: ... 404 File not found + exit 100, identical to real "mirror expired / source dead" - reproducible locally;
  • Fix path: switch to the host's valid mirror (archive.ubuntu.com + correct suite) -> update normal, apt-exit=0.
  • Source comparison: 1BAH/fenrir#10 (custom deb source 404 can't install), amandeepg/notifyosdconfig#1 (old PPA 404) - same phenomenon.

Evidence details kept locally (2026-08-29)

Applicable tools (1)

This problem is linked from the tool pages below — reachable from either side.

apt

Bundled solutions (combos)

This problem is part of the following verified bundles.

Source & evidence

Recorded Verified ✓ VerifiedApplies to 1 tool(s)
Entries contain locally measured or reviewable-source solutions; unmeasured items are explicitly labeled.

Source: https://github.com/1BAH/fenrir/issues/10

← Coding Agents & Terminal domain | Problem Catalog Experience | Facing another issue? Go to the Helpdesk