Wednesday, January 14, 2015

How To Clear (Flush) DNS Cache In OS X Yosemite

So, you want to clear your OS X’s DNS cache but don’t know how and even dscacheutil isn’t getting the job done. That is possibly caused by you being on a different version of Mac’s operating system, most probably OS X Yosemite 10.10.



To clear DNS caches completely on OS X Yosemite (version 10.10.x), 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.



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


That’s all! Click here to read more about flushing DNS cache in OS X Yosemite.


Method 2: Clear MDNS & UDNS caches together


Alternatively, 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

Clearing DNS Cache in other Mac versions


If you are not on OS X Yosemite yet, here is a recap of how to clear or flush dns cache in older versions of Mac.


OS X Mavericks (10.9)


dscacheutil -flushcache; sudo killall -HUP mDNSResponder

OS X Mountain Lion (10.8)


sudo killall -HUP mDNSResponder

OS X Lion (10.7)


sudo killall -HUP mDNSResponder

OS X Snow Leopard (10.6)


sudo dscacheutil -flushcache

OS X Leopard (10.5)


sudo dscacheutil -flushcache

OS X Tiger (10.4)


lookupd -flushcache










How To Clear (Flush) DNS Cache In OS X Yosemite

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.