How to Fix “404 Not Found” Errors When Running `apt update` on Ubuntu 21.10 (Impish Indri)


2 views

The root problem here is that Ubuntu 21.10 (Impish Indri) reached its End of Life (EOL) on July 14, 2022. When a Ubuntu release reaches EOL, Canonical moves its packages from the main repositories to old-releases.ubuntu.com.

The key error messages reveal the issue:

Err:2 http://security.ubuntu.com/ubuntu impish-security Release
  404  Not Found

This occurs because:

  • Main repositories have been archived
  • Security updates are no longer maintained
  • The Release files have been removed

You have three practical options:

Option 1: Upgrade to a Supported Release

The recommended approach is to upgrade to Ubuntu 22.04 LTS:

sudo do-release-upgrade -d

Option 2: Point to Old Releases

If you must keep 21.10, edit your sources list:

sudo sed -i 's|http://.*ubuntu.com|http://old-releases.ubuntu.com|g' /etc/apt/sources.list
sudo sed -i 's|http://security.ubuntu.com|http://old-releases.ubuntu.com|g' /etc/apt/sources.list

Option 3: Manual Package Installation

For critical packages, download them directly:

wget http://old-releases.ubuntu.com/ubuntu/pool/main/p/package-name/package.deb
sudo dpkg -i package.deb

After making changes, run:

sudo apt update
sudo apt --fix-broken install

Best practices for repository management:

  • Always use LTS (Long Term Support) releases for servers
  • Monitor Ubuntu release cycles at ubuntu.com/release-cycle
  • Set up automatic notifications for EOL dates

For PPAs like the graphics-drivers in your error output:

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

The errors you're seeing indicate that Ubuntu 21.10 (Impish Indri) has reached its End of Life (EOL) on July 14, 2022. Canonical typically maintains Ubuntu repositories for 9 months after release for non-LTS versions. When a release reaches EOL:

  • Official repositories are moved to old-releases.ubuntu.com
  • Security updates are discontinued
  • The Release files are removed from standard repositories

First confirm your current Ubuntu version:

lsb_release -a
cat /etc/os-release

You have several options to resolve this:

Option 1: Upgrade to a Supported Version

The recommended approach is to upgrade to Ubuntu 22.04 LTS:

sudo apt update
sudo apt install update-manager-core
sudo do-release-upgrade -d

Option 2: Switch to Old Releases Repository

If you must stay on 21.10 temporarily, modify your sources:

sudo sed -i 's|http://.*ubuntu.com|http://old-releases.ubuntu.com|g' /etc/apt/sources.list
sudo sed -i 's|http://security.ubuntu.com|http://old-releases.ubuntu.com|g' /etc/apt/sources.list

Then clean and update:

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

Option 3: Handle Specific PPAs

For third-party repositories like docker or netdata, you may need to:

sudo add-apt-repository --remove ppa:oibaf/graphics-drivers
sudo rm /etc/apt/sources.list.d/oibaf-ubuntu-graphics-drivers-impish.list

For production systems, always use LTS releases and monitor EOL dates:

ubuntu-support-status

Consider setting up automatic updates with:

sudo apt install unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades

If issues persist, try these diagnostic commands:

apt-config dump | grep -i uri
curl -I http://old-releases.ubuntu.com/ubuntu/dists/impish/Release
apt-get update -o Debug::Acquire::http=true

Remember that continuing to use EOL releases poses security risks. The old-releases repository doesn't receive security patches. For critical systems, upgrading should be your top priority.