E: The repository '...' does not have a Release file.

Fix 'Failed to fetch' repo release file error on Ubuntu

This error hits when you add a repo but didn't run apt update, or the repo URL is wrong. I'll show you the exact fix.

When does this error show up?

You just added a new repository with sudo add-apt-repository ppa:some/ppa or you edited /etc/apt/sources.list. Then you ran sudo apt update and boom – you see something like this:

E: The repository 'https://example.com/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

This happens a lot when you install Docker, Grafana, or any third-party tool from a custom repo. The most common triggers: you skipped sudo apt update after adding the repo, you copied a wrong URL from an old guide, or the repo doesn't support your OS version (like Ubuntu 22.04 vs 20.04).

What's actually going on?

Linux package managers (APT) need a file called Release to know what packages are available and where to get them. If that file is missing or the URL is wrong, APT throws this error. Think of it like walking into a store but the store doesn't have a sign – you can't find what you need. The fix is to either fix the address or tell APT to look properly.

How to fix it – step by step

Step 1: Update your package list first

This sounds dumb, but half the time the problem is that you added a repo and didn't refresh the list. Run:

sudo apt update

If you see the error again, move to Step 2.

Step 2: Check which repo is broken

Look at the full error line. It should tell you the exact URL and the OS version (like 'focal' or 'jammy'). For example:

E: The repository 'http://example.com/ubuntu jammy Release' does not have a Release file.

Check if that repo actually exists for your Ubuntu version. I wasted an hour once because I used a repo that only supported Ubuntu 18.04 on a 22.04 machine.

Step 3: Fix the repository URL

Open your sources list. Run:

sudo nano /etc/apt/sources.list

Or if the repo was added via a .list file in /etc/apt/sources.list.d/, look there:

ls /etc/apt/sources.list.d/

Find the file that matches the broken repo (e.g., docker.list). Edit it:

sudo nano /etc/apt/sources.list.d/docker.list

Check the URL line. It should look like:

deb [arch=amd64] https://download.docker.com/linux/ubuntu jammy stable

If you see 'focal' but you're on Ubuntu 22.04, change it to 'jammy'. Not sure what your OS version is? Run:

lsb_release -cs

That prints your codename (like 'jammy' for 22.04 or 'focal' for 20.04).

Step 4: Remove the repo if you can't fix it

If the repo doesn't support your OS version at all (old repo, abandoned project), just delete it. Run:

sudo rm /etc/apt/sources.list.d/bad-repo.list

Or if it's in the main sources.list, comment out the line with a # at the start.

Step 5: Update again

After fixing or removing the repo, run:

sudo apt update

No more error? Good. If you still see it, check if you have duplicate entries or typos.

Still failing? Check these things

  • Internet or firewall: Some corporate networks block certain repo servers. Try curl -I https://example.com/ubuntu to see if you get a 200 response.
  • PPA repos need the full apt-add-repository command: Manually adding PPA URLs often fails. Use sudo add-apt-repository ppa:user/name instead.
  • Old cached data: Clear the apt cache with sudo apt clean and sudo apt autoclean, then update again.
  • Misspelled codename: Check for typos like 'jammy' vs 'jamy'. One letter off and APT can't find the Release file.

I've seen this error hundreds of times. It's almost always a wrong URL or a forgotten sudo apt update. You got this.

Related Errors in Linux & Unix
Fix SSH Permission Denied with Public Key Authentication Killed process (PID) by oom_killer Linux OOM Killer: Process Terminated by Out-of-Memory Killer Swap partition not active? Here's how to fix it fast mount: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage ISO won't mount: wrong fs type, bad option, bad superblock

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.