How to Fix “Failed to Download Repository Information” in Ubuntu

Maintaining software on Ubuntu relies on the Advanced Package Tool (APT) querying central package archives. However, running sudo apt update or using the graphical Software Updater can suddenly halt with the warning dialogue: Failed to download repository information: Check your Internet connection.

Inspecting the underlying terminal output typically reveals specific HTTP errors, such as: W: Failed to fetch http://... 404 Not Found, followed by E: Some index files failed to download. They have been ignored, or old ones used instead. Despite what the graphical message suggests, this error is almost never caused by your local Wi-Fi or broadband connection. It indicates that APT attempted to query a repository that has moved, expired, been decommissioned, or belongs to an end-of-life Ubuntu release. Here is how to diagnose the error and restore smooth package updates.

Identify Which Specific Repository Triggered the 404 Error

The graphical Software Updater only displays a vague summary. To see exactly which repository failed, run the update command directly in the terminal (press Ctrl + Alt + T):

sudo apt update

Scan through the terminal output for lines highlighted in yellow or red starting with W: (Warning) or E: (Error). Pay close attention to the URL listed immediately after Failed to fetch:

  • A Third-Party PPA (Launchpad): A URL containing ppa.launchpadcontent.net indicates that a developer has deleted the PPA or has not published packages for your specific Ubuntu version.
  • Official Ubuntu Archive 404s: A URL containing archive.ubuntu.com or security.ubuntu.com returning 404 errors indicates that your installed Ubuntu version has reached End of Life (EOL).
  • Expired GPG Signing Keys: Lines ending with The following signatures couldn’t be verified because the public key is not available mean the repository’s cryptographic key has expired or rotated.

Method 1: Remove Inactive or Broken PPAs via Terminal

If the error points to an obsolete Personal Package Archive (PPA) that you previously added for third-party software, the simplest solution is to remove that repository.

You can remove the offending PPA using the add-apt-repository command with the --remove flag:

sudo add-apt-repository --remove ppa:<repository-owner>/<ppa-name>

For example, if an outdated graphics PPA is failing:

sudo add-apt-repository --remove ppa:oibaf/graphics-drivers
sudo apt update

Method 2: Delete Obsolete Repository Files in sources.list.d

Modern Ubuntu installations (especially Ubuntu 22.04 LTS and 24.04 LTS) store third-party software sources as standalone files inside /etc/apt/sources.list.d/. If an external repository was installed manually by downloading a .list or .sources file, you can remove it directly.

  1. List all configured third-party repository files:
    ls /etc/apt/sources.list.d/
  2. Identify the file corresponding to the failed URL identified in your initial terminal scan.
  3. Delete or move the file out of the directory:
    sudo rm /etc/apt/sources.list.d/<problematic-repo>.list
    (Or .sources if using the newer deb822 format.)
  4. Refresh your package lists to verify the error is gone:
    sudo apt update

Method 3: Fix End-of-Life (EOL) Ubuntu Releases Using old-releases

If you are running an interim Ubuntu release (such as Ubuntu 21.04, 21.10, 22.10, or 23.04) that only offered 9 months of support, Canonical removes its packages from the primary archive.ubuntu.com servers after support concludes. When this happens, all official update URLs immediately return 404 errors.

To restore package installation functionality on an EOL release, you must point your sources to Canonical’s dedicated old-releases archive server:

  1. Back up your current sources list:
    sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
  2. Open /etc/apt/sources.list in a text editor:
    sudo nano /etc/apt/sources.list
  3. Replace all instances of archive.ubuntu.com and security.ubuntu.com with old-releases.ubuntu.com. You can perform this substitution automatically using sed:
    sudo sed -i -e 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
    sudo sed -i -e 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
  4. Update your package index:
    sudo apt update

Once your sources point to old-releases.ubuntu.com, package downloads will succeed immediately, allowing you to upgrade your system to a supported Long Term Support (LTS) release.

Method 4: Purge Corrupted Local APT Lists

Occasionally, an interrupted download leaves partial or corrupted index files inside /var/lib/apt/lists/, causing APT to misread server manifests.

sudo rm -rf /var/lib/apt/lists/*
sudo apt clean
sudo apt update

Deleting the contents of /var/lib/apt/lists/ forces APT to fetch a completely fresh, uncorrupted copy of package index metadata from all active mirrors.

Diagnostic Matrix for Repository Download Failures

The table below provides a quick guide to matching APT error messages with their specific solutions:

Error Message String Underlying Cause Primary Resolution
404 Not Found [IP: ...] on PPA Maintainer deleted or moved PPA Remove PPA with add-apt-repository --remove
404 Not Found on archive.ubuntu.com End-of-life unsupported Ubuntu version Switch mirrors to old-releases.ubuntu.com
NO_PUBKEY [Hex-Key] Missing or expired GPG public key Import key via gpg --recv-keys or update keyring
Hash Sum mismatch Corrupted local metadata or proxy cache Purge lists with rm -rf /var/lib/apt/lists/*

Keeping Ubuntu Repositories Healthy

To avoid repository errors in the future, stick to official Ubuntu LTS releases (such as 22.04 LTS and 24.04 LTS) which guarantee five years of maintenance updates. When installing third-party tools, prefer modern containerised formats like official Snaps or Flatpaks, which update independently without altering your system-wide APT sources.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.