Ubuntu: Failed to fetch
Fix error during update
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/..
Error
Example:
sudo apt update
....
....
....
....
Err:25 http://us.archive.ubuntu.com/ubuntu kinetic/universe amd64 xfdesktop4-data all 4.17.0-1
404 Not Found [IP: 91.189.91.38 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/x/xrdp/xrdp_0.9.19-1_amd64.deb 404 Not Found [IP: 91.189.91.39 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/d/dbus/dbus-x11_1.14.0-2ubuntu3_amd64.deb 404 Not Found [IP: 91.189.91.39 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/e/exo/libexo-common_4.17.2-1_all.deb 404 Not Found [IP: 91.189.91.39 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/libx/libxfce4util/libxfce4util-common_4.17.2-1_all.deb 404 Not Found [IP: 91.189.91.39 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/libx/libxfce4util/libxfce4util7_4.17.2-1_amd64.deb 404 Not Found [IP: 91.189.91.39 80]
Fix
Solution:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i -re 's/([a-z]{2}.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update