By Vincent Ooi
The error messages after the update run is:
W: Failed to fetch http://nginx.org/packages/mainline/debian/dists/codename/nginx/source/Sources 404 Not Found [IP: 206.251.255.63 80]
W: Failed to fetch http://nginx.org/packages/mainline/debian/dists/codename/nginx/binary-amd64/Packages 404 Not Found [IP: 206.251.255.63 80]
W: Failed to fetch http://nginx.org/packages/mainline/debian/dists/codename/nginx/binary-i386/Packages 404 Not Found [IP: 206.251.255.63 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Any help appreciated…
Thank you
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This happened after I tried to upgrade to Ubuntu 16.04.3 LTS by running ‘do-release-upgrade’
You’re using Debian repos on Ubuntu and you haven’t replaced codename with the codename of your version (which can be found at https://nginx.org/en/linux_packages.html#distributions)
You can remove the nginx lines from sources.list(.d) and follow the instructions on the nginx package install guide to add the repository properly and resolve the error.
If you would, please try running:
rm -rf /var/lib/apt/lists/*
Once ran, please try running apt-get update once again. Generally, that’ll solve the issue, as long as the repositories in your sources.list file are correct and have not been modified.
…
When running do-release-upgrade, you generally need to modify the source repositories so that the command pulls from the release you want to upgrade to. This isn’t generally a command I would run on a production server though as it can have some unintended side effects and require quite a bit of troubleshooting.
When it comes to major releases, such as upgrading from 14.04 to 16.04, it’s often best to deploy a new server with 16.04 and migrate data over to it. It’s a bit of a manual process, though it’ll ensure everything runs smoothly.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.