Categories
Developer

Flush any DNS cache

Windows

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

ipconfig /flushdns

That’s it.

macOS

In stark comparison, Apple decided to Think Differentâ„¢ and make 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 Apple. 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

flush-dns

Hey Apple. The 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! Hint, hint. Backports too, please.

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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.