Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

Fix 404 Not Found Repository Errors in Ubuntu/Debian distribution

Posted on 26/08/202215/08/2026 Raphael Gab-Momoh By Raphael Gab-Momoh 5 Comments on Fix 404 Not Found Repository Errors in Ubuntu/Debian distribution
  1. Home
  2. Linux
  3. 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.

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 Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
Linux

Post navigation

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

Related Posts

  • PersonalHow to Create Symbolic Links in Linux
    All You Need to Know About Symbolic Links in Linux Linux
  • feature photo quit vim
    How to Exit Linux Vim or Vi Editor Linux
  • sdfdghjk
    How to fix “Job for Mattermost service failed” error Linux
  • How to create edit save exit file
    Mastering Vim in Linux: How to Create, Edit, Save, and Quit Files Linux
  • AADSTS900144
    Fix AADSTS900144: The request body must contain the parameter Linux
  • physical
    Linux Machine: Is it Virtual or a Physical server Linux

More Related Articles

cryptsetup How to encrypt a partition with Cryptsetup Linux
dsdfg Create a Bootable USB Drive Using dd Command on Linux Linux
greywireshark How to install WireShark on a Linux Ubuntu System Linux
feature linux boot process Linux Boot Process Explained Step by Step for Beginners Linux
SUBVERSION FEATURE How to Install Apache Subversion on a Linux System Linux
dfeef How to automatically resolve errors associated with failed dependencies Linux

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

vexpert-badge-stars-5

Virtual Background

VEEAMLEGEND

Categories

Top 30 Sysadmin blog

veeaam100

Veeam Vanguard

  • images 3 4
    Fix an appropriate resource file could not be found for the file for BitLocker Management Windows Server
  • esd convert wim 1280x720 1
    Differences between Capture image, Discover image, Install and Boot images Windows Server
  • Emulate Cisco Router with GNS3
    How to make a router function as a switch in GNS3 Network | Monitoring
  • gns3
    GNS3 Setup: Error opening file for writing during installation Windows
  • Screenshot 2020 06 22 at 23.27.40 1
    Install MSSQL 2019 Developer Edition and SSMS on Windows Oracle/MSSQL/MySQL
  • Windows 11 Taskmanager
    Create Task Manager Shortcuts: How to add access, pin the Task Manager on Windows 11 Windows
  • screenshot 2020 02 08 at 15.53.31
    Enable Automatic Logon on Windows Windows Server
  • Cluster
    Install and configure Hyper-V Cluster On Windows Server 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,745 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Contact
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon
  • Bsky

Tags

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

Copyright © 2026 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.