How to fix E: Some index files failed to download. They have been ignored, or old ones used instead in APT
This warning occurs when apt cannot download package repository index files due to network issues, unreachable mirrors, or connectivity problems. The system falls back to cached versions, but you may miss critical updates or security patches.
Quick fix
Fixes E: Some index files failed to download. They have been ignored, or old ones used instead
ping google.com- Check your internet connection
- Wait and retry the update
- Check your DNS configuration
- Switch to the default Ubuntu mirror
ping google.comE: Some index files failed to download. They have been ignored, or old ones used instead
What this error means
When you run `apt update` or `apt-get update`, apt tries to download the latest package indexes from configured software repositories (mirrors). These indexes contain lists of available packages, versions, and dependencies. If apt cannot reach one or more mirrors, it warns you with this message and uses previously cached index files instead. While your system can still function, you won't have access to the latest packages and security updates until the issue is resolved.
Typical symptoms
- Warning message appears when running apt update or apt-get update
- Cannot install or update packages that might be available in the failed repositories
- System uses outdated package cache instead of current repository data
- Updates may be incomplete or missing critical security patches
Common causes
- Network connectivity problems or unstable internet connection preventing reaching the repository mirrors
- One or more configured mirrors being temporarily down, offline, or unreachable
- DNS resolution failures when trying to connect to repository servers
- Firewall or proxy configuration blocking access to repository mirrors
- Repository mirrors being geographically far away or overloaded
- IPv6 connectivity issues when the system tries to reach mirrors via IPv6
- Disabled or incorrect software repositories in the apt sources list
How to fix "E: Some index files failed to download. They have been ignored, or old ones used instead"
First, verify that your internet connection is stable and working:
ping google.comIf the ping fails, your internet connection is down. Reconnect to your network or fix your network configuration before proceeding.
Often, this error is temporary because a mirror is temporarily unavailable. Wait 30-60 seconds and try again:
sudo apt updateIf the error clears, the mirror has come back online. This is the most common resolution.
Poor DNS resolution can cause mirror connection failures. Test if DNS is working:
nslookup archive.ubuntu.comIf this fails, your DNS is misconfigured. You can temporarily use Google's DNS:
sudo nano /etc/resolv.confAdd or modify:
nameserver 8.8.8.8
nameserver 8.8.4.4Save and exit (Ctrl+X, then Y, then Enter).
If a custom mirror is causing the issue, reset to the official Ubuntu mirror:
sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup
sudo cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list
sudo apt updateThis restores the default sources list. If the update succeeds, you can examine what was wrong with the original sources.list file.
If the default mirror is slow or unreachable, try switching to a mirror closer to your location. Edit your sources list:
sudo nano /etc/apt/sources.listLook for lines like:
deb http://us.archive.ubuntu.com/ubuntu/ focal mainReplace the country code (e.g., us) with your country code (e.g., uk, de, ca, au). For a complete list of mirrors, visit the Ubuntu Mirror List (https://launchpad.net/ubuntu/+cdmirrors).
Save and run:
sudo apt updateSometimes the cached index files become corrupted. Delete and regenerate them:
sudo mv /var/lib/apt/lists /var/lib/apt/lists.backup
sudo mkdir /var/lib/apt/lists
sudo apt updateThis safely backs up the old cache and creates fresh index files. If apt update succeeds, the previous indexes were corrupted.
Clear the apt package cache, which may contain corrupted or outdated files:
sudo apt clean
sudo apt updateThis removes cached .deb files from /var/cache/apt/archives/, which may have been causing issues.
If you're behind a corporate firewall or proxy, it may be blocking access to repositories. You can test direct connectivity to a mirror:
curl -I http://archive.ubuntu.com/If this fails, contact your network administrator. If you're using a proxy, configure apt to use it:
sudo nano /etc/apt/apt.conf.d/proxy.confAdd (replace with your proxy details):
Acquire::http::Proxy "http://proxy-ip:port/";
Acquire::https::Proxy "https://proxy-ip:port/";If you don't have IPv6 connectivity, apt may be trying to use IPv6 to reach mirrors. Temporarily disable IPv6 to test:
sudo nano /etc/sysctl.confAdd or uncomment these lines:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1Apply the changes:
sudo sysctl -pThen try:
sudo apt updateIf this fixes it, you can keep IPv6 disabled or fix your IPv6 connectivity properly.
Advanced notes
This error is a warning (marked 'W:' or 'E:' depending on severity), not a failure. apt can still function using older cached indexes, but you won't receive the latest package updates or security patches. On systems in isolated networks or behind restrictive firewalls, you may need to configure a local apt mirror or use a working system to copy sources.list and index files. For servers, consider using a caching proxy like apt-cacher-ng to handle mirror failures gracefully. The underlying issue is almost always temporary mirror unavailability—most mirrors experience brief downtime regularly. If a specific mirror is consistently unreliable, switching to a different mirror (geographic or CDN-based like ddebian.org) resolves the issue permanently.
Frequently asked questions
- What does "E: Some index files failed to download. They have been ignored, or old" mean?
- When you run apt update or apt-get update, apt tries to download the latest package indexes from configured software repositories (mirrors). These indexes contain lists of available packages, versions, and dependencies. If apt cannot reach one or more mirrors, it warns you with this message and uses previously cached index files instead.
- How do I fix "E: Some index files failed to download. They have been ignored, or old"?
- This warning occurs when apt cannot download package repository index files due to network issues, unreachable mirrors, or connectivity problems. The system falls back to cached versions, but you may miss critical updates or security patches.
- What causes "E: Some index files failed to download. They have been ignored, or old"?
- Network connectivity problems or unstable internet connection preventing reaching the repository mirrors One or more configured mirrors being temporarily down, offline, or unreachable DNS resolution failures when trying to connect to repository servers
- Is the "E: Some index files failed to download. They have been ignored, or old" error serious?
- It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- 📚APT Official Documentation
- 📝
- 📝
- 📝
- 📖Plesk Support - Some index files failed to download(Official Docs)