
A 404 during apt-get update means apt reached out to a repository URL listed in /etc/apt/sources.list and got nothing back — the repository moved, was removed, or never existed at that address. There are really only three causes behind almost every one of these errors, and each has a completely different fix. Guessing wrong wastes time; this covers all three and how to tell which one you actually have.
The Three Real Causes
| Cause | How to spot it | Fix |
|---|---|---|
| Your Ubuntu release reached end of life | 404s point at archive.ubuntu.com or security.ubuntu.com specifically | Point sources.list at old-releases.ubuntu.com instead [1][2] |
| A PPA was deleted or abandoned | 404 points at a ppa.launchpadcontent.net or launchpad.net URL | Remove that specific PPA |
| A typo or stale entry in sources.list | 404 points at a URL that looks malformed or references a release codename that doesn’t match your actual version | Edit or remove the bad line directly |
Cause 1: Your Ubuntu Release Reached End of Life
Canonical’s own release cycle is explicit about this: interim (non-LTS) releases get 9 months of updates, while LTS releases get 5 years of standard security maintenance [1]. Once that window closes, the release’s packages are pulled from the main archive.ubuntu.com and security.ubuntu.com mirrors entirely — that’s exactly why apt-get update starts throwing 404s on a server nobody touched, the OS didn’t change, the repository moved out from under it.
Canonical maintains old-releases.ubuntu.com specifically as a permanent archive for exactly this situation [1][2]. The fix is to repoint every repository entry at the archive instead of the live mirrors:
sudo sed -i -r 's/([a-z]{2}\.)?archive\.ubuntu\.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo sed -i -r 's/security\.ubuntu\.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update
This gets apt-get update and package installs working again, but it’s a stopgap, not a fix for the underlying problem: an EOL release stops receiving security patches the moment it goes EOL, archive or no archive [2]. Treat this as buying time to plan an actual upgrade, not a permanent solution.
Cause 2: A Dead or Removed PPA
A PPA (Personal Package Archive) is a third-party repository hosted on Launchpad, added to your system with sudo add-apt-repository ppa:some/ppa, which appends its address to your sources list so apt searches it alongside the official Ubuntu archives [3]. PPAs are maintained by individuals or small teams, not Canonical — when a maintainer deletes a PPA, stops publishing builds for your Ubuntu version, or lets their Launchpad account lapse, that repository line in your sources.list starts 404ing while everything else keeps working fine.
The fix is narrower than the EOL case — remove just that one entry rather than touching your whole sources list:
sudo add-apt-repository --remove ppa:owner/ppa-name
sudo apt-get update
If you don’t remember which PPA you added, the 404 error message itself names the exact URL — the PPA owner and name are right there in the path.
Cause 3: A Typo or Stale Line in sources.list
/etc/apt/sources.list is a plain text file where each line specifies a repository type, URI, and release codename [4] — which means it’s just as editable, and just as breakable, by hand as any other config file. A mistyped URL, a leftover line referencing a codename from a previous OS upgrade that never got cleaned up, or a manually-added repository that used the wrong distribution name all produce the same 404 symptom as the other two causes, but the fix is just correcting or deleting that one line with a text editor — no archive redirect, no PPA removal command needed.
Which Cause Do You Have?
Where does the 404 URL point?
Check the URL in your error message and pick the closest match.
On a Rented VPS, Check This Before You Assume EOL
If this is happening on a Linux VPS rather than a machine you set up yourself, run lsb_release -a first to confirm exactly which Ubuntu version is actually installed — a server provisioned from an older template image is a common, easy-to-miss reason a “new” VPS is already partway to EOL. If the release genuinely is current and you’re still seeing 404s, it’s almost certainly cause 2 or 3, not cause 1.
Frequently Asked Questions
Is switching to old-releases.ubuntu.com a permanent fix?
It restores apt-get update functionality, but an EOL release still receives zero security patches regardless of which mirror serves its packages [2]. Plan an actual upgrade to a supported release rather than treating this as a long-term solution.
How do I know which PPA is causing the 404?
The 404 error message itself includes the full failing URL, which contains the PPA owner and name directly in the path — no guessing required.
Can I just delete sources.list and start over?
Not recommended — you’d lose every PPA and custom repository you’ve added. Editing or removing the specific bad line is safer and keeps everything else working.
Why did this start happening on a server nobody touched?
Time passing is enough on its own — an Ubuntu release reaching its EOL date, or a PPA maintainer removing their repository, both happen independently of anything you did on the server itself.
Conclusion
Every apt-get 404 traces back to one of three causes: an EOL release whose packages moved to the archive, a dead PPA, or a bad line in sources.list — and the 404 error message itself, read carefully, almost always tells you which one. Fix the specific cause rather than reaching for a generic “reinstall apt” solution, and if it’s the EOL case, treat the archive redirect as a temporary bridge to a real upgrade, not a destination.
References
- Canonical/Ubuntu — “Ubuntu release cycle” (official) — ubuntu.com
- Xmodulo — “How to fix ‘404 Not Found’ error with ‘apt-get update’ on old Ubuntu” — xmodulo.com
- Ubuntu Community Help Wiki — “PinningHowto” (PPA/apt mechanics) — help.ubuntu.com
- Ubuntu Manpages — “sources.list(5)” (official) — manpages.ubuntu.com
