Apr 06, 2015

How can I clear the DNS cache in a Mac running OS X Yosemite?

To clear DNS caches completely on OS X Yosemite. you will need to clear both MDNS (Multicast DNS) and UDNS (Unicast DNS) caches via Terminal. Here’s how you can get this done.

Method 1: Clear MDNS & UDNS caches Separately

Enter the following commands separately in your terminal.
To launch Terminal, Command + Space to launch Spotlight, type "terminal", hit enter.

The first will clear the MDNS cache and the second will clear the UDNS cache. You will require the admin password to perfom this task.

sudo discoveryutil mdnsflushcache

sudo discoveryutil udnsflushcaches

Method 2: Clear MDNS & UDNS caches together
you can use the following command. Basically it’s the same, it combines both of the above into one.

sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches;say flushed
Launch Terminal: command+space, then type “terminal” and hit enter, then type in the following commands. Note: you need the admin password.
To clear MDNS enter: sudo discoveryutil mdnsflushcache
To clear UDNS enter: sudo discoveryutil udnsflushcaches

More cache clearing information, if you need it: http://osxdaily.com/2014/11/20/flush-dns-cache-mac-os-x/
Answer this