How to fix “404 Not Found” error with “apt-get update” on Ubuntu 15.04


Quary
How to fix “404 Not Found” error with “apt-get update” on Ubuntu 15.04

Error
When Updating System Packages with apt-get update Will Get Error Like Below
W: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/vivid/main/binary-i386/Packages  404  Not Found
W: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/vivid-updates/main/binary-i386/Packages  404  Not Found

Replace Old Repositories in /etc/apt/sources.list
sudo sed -i -r ‘s/([a-z]{2}.)?archive.ubuntu.com/old-releases.ubuntu.com/g’ /etc/apt/sources.list
sudo sed -i -r ‘s/security.ubuntu.com/old-releases.ubuntu.com/g’ /etc/apt/sources.list

Update System Packages with apt-get update after Replacing Old Repositories (Should Work)
sudo apt-get update

Advertisements