When working with Debian Lenny (5.0), a long-EOL release, you'll encounter 404 errors during apt-get update
because the official repositories have been moved to archive servers. The standard repo URLs in your sources.list
no longer work.
Replace your current /etc/apt/sources.list
with these archive URLs:
# Debian Lenny Main Archive
deb http://archive.debian.org/debian/ lenny main contrib non-free
# Debian Lenny Security Updates
deb http://archive.debian.org/debian-security lenny/updates main contrib non-free
# Debian Lenny Proposed Updates
deb http://archive.debian.org/debian lenny-proposed-updates main contrib non-free
You'll need to modify APT's behavior to work with archived repositories:
# Create or edit /etc/apt/apt.conf.d/99archive
echo 'Acquire::Check-Valid-Until "false";' | sudo tee /etc/apt/apt.conf.d/99archive
After making these changes, run:
sudo apt-get clean
sudo apt-get update
You should now see successful repository updates instead of 404 errors.
For package installations, you might need to force specific versions:
sudo apt-get install package=version
Example for installing an older version of openssl:
sudo apt-get install openssl=0.9.8g-15+lenny16
For production systems, consider upgrading through supported releases:
lenny → squeeze → wheezy → jessie → stretch → buster → bullseye
Each step requires careful planning and testing.
- Debian Lenny reached EOL in February 2012
- Security updates are no longer available
- Consider migrating to a supported release
- For legacy applications, containerization might be a better solution
Debian Lenny (5.0) reached end-of-life (EOL) on February 6th, 2012, which means official repositories have been moved to the Debian archive. The URLs in your current sources.list are attempting to access non-existent locations.
Here's the corrected configuration for Lenny repositories:
# Debian Lenny Main Repositories
deb http://archive.debian.org/debian/ lenny main contrib non-free
# Debian Lenny Security Updates (frozen)
deb http://archive.debian.org/debian-security/ lenny/updates main contrib non-free
# Debian Lenny Proposed Updates (frozen)
deb http://archive.debian.org/debian/ lenny-proposed-updates main contrib non-free
1. Backup your current sources.list:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2. Edit the file with your preferred editor:
sudo nano /etc/apt/sources.list
3. Replace contents with the updated configuration above
4. Run apt-get update:
sudo apt-get update
If you still encounter issues, you may need to modify your APT configuration to handle the outdated Release files:
# Create or edit the following file
sudo nano /etc/apt/apt.conf.d/99ignore-release-date
# Add this content
Acquire::Check-Valid-Until "false";
For systems that must remain on Debian Lenny:
- Consider setting up a local mirror of the archived repositories
- Look into third-party repositories that still maintain Lenny packages
- Evaluate upgrading to a supported Debian release
When necessary packages aren't available, you may need to:
# Download .deb packages manually
wget http://archive.debian.org/debian/pool/main/p/package/package_version.deb
# Install with dpkg
sudo dpkg -i package_version.deb
# Resolve dependencies
sudo apt-get install -f