E: Some index files failed to download. They have been ignored, or old ones used instead.
always how can fix it please help
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!
Generally speaking, you’ll see that message when repositories can not be reached. The result of the request was a 404 or they didn’t respond in time.
This can happen from time to time, though it can also happen if you’ve made any changes to your apt sources.list file, added repositories, etc.
The default location for your sources file is going to be in /etc/apt and the main file is:
/etc/apt/sources.list
Other sources files may be contained in this directory:
/etc/apt/sources.list.d
You can run:
cat /etc/apt/sources.list
… to view the contents of your main sources file. By default, you should see DigitalOcean pop up as repository sources if you’ve not modified them.
If there are other sources files in the sources.list.d directory that you’ve added, you’ll want to check those as well.
Without seeing the full output, it’s hard to see which are the main issue though, so if you can run:
apt-get update
and then post the entire output, that’d help us to look in to this further.
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.