Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



MacOS X - How to fl...
 
Share:
Notifications
Clear all

[Solved] MacOS X - How to flush the DNS cache

1 Posts
1 Users
0 Reactions
1,866 Views
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter  

OS X, like Windows, Linux and other Operating Systems, keeps a local cache of resolved DNS queries for a time defined by the DNS server. Sometimes it might be necessary to reset the cache immediately and re-query a DNS server. For example, you might need to do this if you are a network or server administrator and an entry on your DNS server has recently changed. 

If your Mac isn't using the latest DNS entries from your server, you can restart your Mac to update its cached information. If you need to update DNS entries on a server using OS X and you can't restart the server, use the terminal commands below for the version of OS X you're using. 


OS X Yosemite (10.10.4 and higher) 
Use the following Terminal command to reset the DNS cache:
 

sudo killall -HUP mDNSResponder
OS X Yosemite (< 10.10.4)

Use the following Terminal command to reset the DNS cache in OS X Yosemite v10.10 through v10.10.3: 

sudo discoveryutil mdnsflushcache 

OS X Mavericks, Mountain Lion, and Lion (10.7.x ... 10.9.x) 
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

   
ReplyQuote
Share: