Technical Anshu
Tutorials Blog
🐧 Ubuntu apt Fix

Fix apt-get Update Not Working in Ubuntu

You ran the update command and got a wall of red text. Here is the honest truth: apt almost always tells you exactly what is wrong - in the last three lines. This guide teaches you to read them, match the error to one of five causes, and fix only that one.

✍️ Technical Anshu🐧 Ubuntu / Linux⏱️ 8 minute read
🎥 Watch the full video - the apt-get update fix shown live, step by step

Every Ubuntu user meets this screen one day: sudo apt update ends in errors, and it feels like the whole update system is broken. It almost never is. One source out of many has a problem - a wrong clock, an old release, a dead PPA, a missing key - and apt names it at the bottom of the output. Work through this page in order: read the ending, run two 30-second checks, match the error, fix the one guilty source.

Terminal - sudo apt update
$ sudo apt update Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB] Err:3 https://ppa.launchpadcontent.net/someteam/ppa/ubuntu jammy Release 404 Not Found [IP: 185.125.190.52 443] Reading package lists... Done E: The repository 'https://ppa.launchpadcontent.net/someteam/ppa/ubuntu jammy Release' does not have a Release file.
A real apt update run looks like this: most lines succeed, one source fails, and the actual reason waits at the very bottom. Repository names and addresses shown are examples.
1

First Rule - Read the Last Lines, Not the First

When sudo apt update fails, the screen fills with lines and most of them are good news. Hit means a source answered fine. Get means a fresh list was downloaded. Only two kinds of lines matter: lines starting with Err in the middle, and the summary lines starting with E: or W: at the very end. Scroll to the bottom first - the last two or three lines name the broken source and the reason, in plain words.

One honest fact that calms most people down: one broken source does not poison the others. The sources that said Hit or Get updated normally. Your job is to find the one bad entry, fix or disable exactly that entry, and run the update again. Never start by deleting the whole sources file.

2

The Two 30-Second Checks Before Anything Else

Two causes are so common and so quick to test that they come before any file editing.

  1. The clock. Run date and look at it. If the date or time is clearly wrong - a dead CMOS battery and dual-boot machines do this often - apt rejects repository files as "not valid yet". Turn on network time with sudo timedatectl set-ntp true, wait a minute, and try again.
  2. The connection. Run getent hosts archive.ubuntu.com. If it prints nothing and apt said Temporary failure resolving, your PC cannot translate names into addresses - that is a network or DNS problem, not an apt problem. Fix the connection first.
3

Match the Error to Its Cause

Almost every apt update failure is one of these five. The wording tells you which:

  1. "Release file ... is not valid yet" - the system clock is wrong.
  2. "does not have a Release file" with a 404 on archive.ubuntu.com - your Ubuntu release has reached end of life and its files moved to old-releases.ubuntu.com.
  3. The same 404 wording, but the address is ppa.launchpadcontent.net - one third-party PPA you added earlier is broken, renamed or does not carry your release.
  4. "NO_PUBKEY" or "is not signed" - a repository's signing key is missing on your PC.
  5. "Could not get lock" - another package process (often automatic updates) is already running. Nothing is broken; wait for it.

Each of these has its own detailed guide in this series - clock, old release, PPA, GPG key, lock, and mirror problems are each fixable in a few minutes once you know which one you have.

4

Fix Only the Guilty Source - and Back Up First

True
5

Run It Again and Read the Ending

Run sudo apt update once more and read the last lines again. Success looks boring: a row of Hit and Get lines, Reading package lists... Done, and no E: lines at all. If a different error appears now, that is progress, not failure - you fixed the first cause and uncovered the second one. Work through them one at a time, in the order apt reports them. When the ending is clean, your update system is healthy again and you can upgrade packages safely.

🔴 One warning before you search the internet for fixes: never run a random "fix all apt errors" script, never add --allow-insecure-repositories or --allow-unauthenticated to make an error disappear, and never delete lock files while a process is using them. Those tricks silence the message by removing the safety check - the problem stays, the protection goes.

🎥 Watch the Complete Video for Full Knowledge and Installation

The video walks through the failing update live - reading the errors, finding the cause and fixing it on a real Ubuntu system.

▶️ Watch Full Video
❓ Common Questions (FAQ)

Why does apt update fail when most sources show Hit?

Hit means that source answered correctly and its list is current. apt update checks every source in your list, and the command reports failure if even one source errors - even though the rest updated fine. The failing source is named in the E: lines at the end of the output, and that one entry is all you need to fix or disable.

Is apt-get different from apt for this problem?

For updating package lists they do the same job: sudo apt update and sudo apt-get update read the same sources files and fail on the same errors. apt is the newer, friendlier command and apt-get is the older one scripts still use. Every fix in this guide - clock, repository, PPA, key and lock - applies identically to both.

I see many errors at once. Where do I start?

Start at the bottom. The final E: lines summarise what actually failed, and the Err lines just above them belong to the same source. Fix the first cause you can identify, run sudo apt update again, and read the new ending. Causes disappear one at a time, and fixing them in any other order usually just moves the errors around.

This guide is based on the Technical Anshu video on fixing apt-get update errors in Ubuntu • Stuck on a step? Ask in the video comments - answers live there 🙏