Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Linux » Fix 404 Not Found Repository Errors in Ubuntu/Debian distribution
  • Trellix MVISOSN
    How to install Trellix MVISON Endpoint Security | Vulnerability Scans and Assessment
  • Create a self signed cert via IIS
    How to create a self-signed cert via IIS Windows
  • unnamed 2
    How to create a contact in Active Directory Windows Server
  • Slide4
    How to install Let’s Encrypt on Apache Web Server Linux
  • Creating a WinPE USB Drive Fixing System Boot Issues
    Creating a WinPE USB Drive: Fixing System Boot Issues Windows
  • Veeam
    Install and configure Veeam Backup and Replication Community Edition Backup
  • ghm
    MDT Driver injection: How to import drivers in .exe format into Microsoft Deployment Toolkit Windows Server
  • sandboxx
    Use Windows Sandbox as a security feature Virtualization

Fix 404 Not Found Repository Errors in Ubuntu/Debian distribution

Posted on 26/08/202225/01/2026 Raphael Gab-Momoh By Raphael Gab-Momoh 5 Comments on Fix 404 Not Found Repository Errors in Ubuntu/Debian distribution
ERRORFEATURE-1

If you use the desktop edition of Ubuntu, you may ultimately run into the issue where apt-get update frequently returns “Failed to obtain 404 Not Found” warnings. The identical issue could also arise when using apt-get install. Not to worry; it will be resolved shortly. In this article, you will learn how to Fix 404 Not Found Repository Errors in Ubuntu/Debian distribution. Other guides are here: Change User Account Type in Windows 10 and How to modify Windows 11 Taskbar via Intune and GPO

Also, see How to Change User Account Type in Windows 10 again upgrade from Ubuntu 20.04 LTS to 22.04 LTS and install Rust in a Linux System and Change User Account Type in Windows 10.

The Issue “404 Not Found Repository Errors”

When using the apt-get update or apt-get install command, you can encounter messages similar to the ones below. This is due to the short 9-month support period for Ubuntu versions. Releases with LTS (Long Term Support) have support for 5 years.

You’ll start receiving those error messages as soon as the version you’re using loses support.

The default location below is no longer available due to Ubuntu moving the repositories to a different server.

http://archive.ubuntu.com/ubuntu/dist/
rdgmh@raphael:~$ sudo su
[sudo] password for rdgmh: 
root@raphael:/home/rdgmh# apt update
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]     
Ign:2 http://old-releases.ubuntu.com/ubuntu jammy InRelease                   
Ign:3 http://old-releases.ubuntu.com/ubuntu jammy-updates InRelease           
Ign:4 http://old-releases.ubuntu.com/ubuntu jammy-backports InRelease         
Hit:5 https://packages.microsoft.com/repos/azure-cli jammy InRelease          
Err:6 http://old-releases.ubuntu.com/ubuntu jammy Release                     
  404  Not Found [IP: 91.189.91.124 80]
Ign:7 http://security.ubuntu.com/ubuntu impish-security InRelease             
Err:8 http://old-releases.ubuntu.com/ubuntu jammy-updates Release             
  404  Not Found [IP: 91.189.91.124 80]
Err:9 http://security.ubuntu.com/ubuntu impish-security Release               
  404  Not Found [IP: 91.189.91.38 80]
Err:10 http://old-releases.ubuntu.com/ubuntu jammy-backports Release          
  404  Not Found [IP: 91.189.91.124 80]
Hit:11 http://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease
Reading package lists... Done        
E: The repository 'http://old-releases.ubuntu.com/ubuntu jammy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://old-releases.ubuntu.com/ubuntu jammy-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://security.ubuntu.com/ubuntu impish-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://old-releases.ubuntu.com/ubuntu jammy-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease' doesn't support architecture 'i386'
root@raphael:/home/rdgmh# 

Please refer to these exciting guides: VMSA-2022-0026: An arbitrary file read vulnerability in VMware Aria Operations, how to Search Group Policy for a Specific Setting in Windows 10 and Windows 11, and how to Deploy Code from GitHub to Azure App Service from the Command-line.

How to solve the problem “404 Not Found Repository Errors in Ubuntu/Debian distribution”

There are three ways to make your apt commands function properly once more. Upgrade the Ubuntu release first. Second, change the old package repositories’ sources urls. and finally restore the PPA and default repository. The details of the three options are provided below.

sudo apt-get dist-upgrade  
distro-upgrade
dist-upgrade

As you can see, this didn’t solve the problem so we will go with option 2. You can alter the sources url for the Ubuntu repository to find the older packages if an immediate distribution upgrade is not an option.

Please, see How to fix the Filesystem root is running low on Disk space, and A-Z of XCP-ng and Xen Orchestra setup and VM Creation.

Update Packages Url

To update the sources in /etc/apt/sources, use the sed tool. list file to the new repository location for outdated packages

sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sed
sed

Use the grep command below to see if there are any other files in /etc/apt/sources.list.d/ that require updating.

grep -E 'archive.ubuntu.com|security.ubuntu.com' /etc/apt/sources.list.d/*  
grep
grep

There are a series of steps we need to take further

  1. open /etc/apt/sources.list with a text editor, in this case, i have chosen to use vim so the command will be as shown below:
vim /etc/apt/sources.list

2. We need to comment out extras.ubuntu.com like this below

#extras.ubuntu.com 

The reason we are commenting it out is because the repo is no longer supported

3. replace main/security repositories with old-releases versions as follows.

old.releases
ol-releases
main.security
old-releases replace with main/security

this solution too did not work. Even replaced main/security with the archive as shown below

archive
archive.ubuntu

Replace default repository: The only solution that worked!

The majority of the PPAs and repositories in your sources.list are broken and no longer functional. The default repositories should be restored, in my opinion.

So let’s make a directory change into it and write the following code

mkdir ~/solution
cd ~/solution/

cat << EOF > ~/solution/sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

deb http://archive.canonical.com/ubuntu focal partner
deb-src http://archive.canonical.com/ubuntu focal partner
EOF

sudo rm /etc/apt/sources.list
sudo cp ~/solution/sources.list /etc/apt/sources.list
working-solution
working solutiuon

Remove all the PPAs in your system:

sudo mv /etc/apt/sources.list.d/* ~/solution

run the command to update again and you will see that the problem has been solved

apt update
wala
Finally updated

Summary

404 Not Found is a common problem in Ubuntu and the only effective way to solve this is to replace the default repository just as we saw in the final step above. 

I hope you found this blog post helpful on how to Fix 404 Not Found Repository Errors in Ubuntu/Debian distribution. If you have any questions, please let me know in the comment session.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Linux

Post navigation

Previous Post: Windows Defender Antivirus Management with Intune
Next Post: How to clear cache in Windows 11

Related Posts

  • Webp.net resizeimage 1
    Automate Infrastructure Deployments in the Cloud with Ansible and Azure Pipelines AWS/Azure/OpenShift
  • dfeef
    How to automatically resolve errors associated with failed dependencies Linux
  • Convert PEM to PPK 1
    Convert a PEM Key to a PPK Key on a Linux and Windows AWS/Azure/OpenShift
  • Screenshot 2021 02 14 at 00.35.50
    How to manage automatic login on Ubuntu Linux Linux
  • openshift
    Set up OpenShift Cluster using Red Hat CodeReady Containers Linux
  • image 10
    Change Visual Studio Code UI language JIRA|Confluence|Apps

More Related Articles

Webp.net resizeimage 1 Automate Infrastructure Deployments in the Cloud with Ansible and Azure Pipelines AWS/Azure/OpenShift
dfeef How to automatically resolve errors associated with failed dependencies Linux
Convert PEM to PPK 1 Convert a PEM Key to a PPK Key on a Linux and Windows AWS/Azure/OpenShift
Screenshot 2021 02 14 at 00.35.50 How to manage automatic login on Ubuntu Linux Linux
openshift Set up OpenShift Cluster using Red Hat CodeReady Containers Linux
image 10 Change Visual Studio Code UI language JIRA|Confluence|Apps

Comments (5) on “Fix 404 Not Found Repository Errors in Ubuntu/Debian distribution”

  1. Avatar photo James franklin says:
    27/03/2023 at 4:01 AM

    Thank you so much, I have been searching everywhere to figure this out. your a god bro, again thank you and much abundance to you and yours!

    Log in to Reply
  2. Avatar photo ram says:
    04/04/2023 at 8:48 PM

    tks !! work for me!! , (kubuntu 22,10) regards from argentina

    Log in to Reply
  3. Avatar photo Kelvin says:
    01/06/2023 at 7:59 AM

    Thanks brother..A life saver! It worked on Ubuntu 21.04, June 2023

    Log in to Reply
  4. Avatar photo Mike says:
    06/06/2023 at 12:44 AM

    My guy you are a genius and a scholar. Thanks for this save late at night.

    Log in to Reply
  5. Avatar photo dean says:
    04/08/2023 at 4:56 PM

    That is it, perfect, thank you after hours finding incomplete solutions…this did it!

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Trellix MVISOSN
    How to install Trellix MVISON Endpoint Security | Vulnerability Scans and Assessment
  • Create a self signed cert via IIS
    How to create a self-signed cert via IIS Windows
  • unnamed 2
    How to create a contact in Active Directory Windows Server
  • Slide4
    How to install Let’s Encrypt on Apache Web Server Linux
  • Creating a WinPE USB Drive Fixing System Boot Issues
    Creating a WinPE USB Drive: Fixing System Boot Issues Windows
  • Veeam
    Install and configure Veeam Backup and Replication Community Edition Backup
  • ghm
    MDT Driver injection: How to import drivers in .exe format into Microsoft Deployment Toolkit Windows Server
  • sandboxx
    Use Windows Sandbox as a security feature Virtualization

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,831 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.