Could not resolve

  • Posted September 11, 2014


When I try to run apt-get update or anything else I get this error Could not resolve

I cannot do anything with my droplet.

Do you know what the problem might be?


I had this problem while running Virtualmin and trying to fix a mailer issue. I changed the resolution order to start with the host file instead of DNS just to see if that would fix it, but it just ended up messing with my updates. I changed it back to DNS first and it worked fine again.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


I have the same issue, and I will love not to rebuild my droplet


The DigitalOcean mirrors are resolving correctly for me. You wrote above. Is that just a typo in your question or is that what’s actually on your system? It should be Make sure your sources are correct:

nano /etc/apt/sources.list

Changing file permissions on resolv.conf fixed it for me on a newly restored droplet with Debian 10.

chown root:root /etc/resolv.conf
chmod 644 /etc/resolv.conf

see what is your firwall doing… sudo ufw status numbered

make sure you are not blocking your outband traffect to any of and sites.

Same problem here, in Bangalore servers, tried all the answers, only thing fixed it for me was rebuilding my droplet using IP4 address. Seems the problem is with IPv6 addresses. Hope it helps…

I experienced the problem when I selected Ipv6 but when I created using Ipv4 , I didn’t experience it. I guess there is some problem in Ipv6 resolution

A simple reboot fixed the problem for me. I hope you are as lucky as me.

sudo reboot

I know this is really old, but I had this same issue and have not seen a fix for it yet.

I am thinking this happened because I decided to turn off my BIND dns server within webmin, I was trying to use digitalocean for all my dns needs instead. I haven’t tested whether this was the cause.

I contacted support and was given two things to do.

The first (did not work for me):

rm -rf /var/lib/apt/lists/*
apt-get clean
apt-get update 

The second (did work): change nameserver to and/or in /etc/resolv.conf

Since I am using Virtualmin/ Webmin, I couldn’t just change this file, so I had to do it within webmin. I changed it in two places: a. webmin>Networking>Network Configuration>Hostname and DNS Client These were secondary to, so I just removed that one and moved these up on the list. b. webmin>Networking>Network Configuration>Host addresses changed to where it coincides with my web address.

It was something wrong with the droplet. I rebuild it and I could use normal commands and the problem is solved.