Thanks Microsoft, for making this easy and consistent across all Windows versions! You only need to remember one command:

ipconfig /flushdns

That’s it.


In stark comparison, Apple decided to Think Different™ and made 20 different commands to flush the DNS cache. And there’s only one valid command in each macOS version.

sigh Let’s get to it, shall we?

No. Screw that. I’m not listing all 20 different commands. Instead, we’ll install this little bash script that will take care of flushing the DNS for us.

Follow the guide to install, then run


Hey Apple. That one command up top is so simple and doesn’t conflict with any other command. Almost like it should be the default shortcut available on all macOS versions!

All other operating systems

Wait like 48 hours (no) or reboot your device.

I wish I was joking. On Android and iOS I don’t know if there’s any way for users to empty the DNS cache. For Linux, there are literally hundreds of different implementations for DNS caching and it’s impossible to list them all, even with a bash script.

Update – on iOS there is a workaround. Check this post.