OS X: How to reset the DNS cache

Though I have googled the topic multiple times, I keep forgetting the exact time everytime I go for DNS Flushing in my MAC.

OS X keeps a local cache of resolved DNS queries for a time defined by the DNS server, but sometimes it may be necessary to reset the cache immediately and re-query a DNS server. For example, you might do this after an entry on the server is changed or a new entry is added.

OS X Mountain Lion or Lion

Use the following Terminal command to reset the DNS cache:

sudo killall -HUP mDNSResponder

Mac OS X v10.6

Use the following Terminal command to reset the DNS cache:

sudo dscacheutil -flushcache

 

 

Source: Apple Support.

Leave a Reply

Your email address will not be published. Required fields are marked *