How to flush DNS cache in Mac OS X (Snow) Leopard
When you browse the web or access servers by name you slowly build up a cache of DNS queries.
This is information which site is hosted on what IP. In my work it happens that we move a domain to a new server, which requires me to be able to clear my cache to know faster if the DNS is working properly.
Running the following commands clears the cache and restarts the cache daemon so it will fetch changes that might have been done in the DNS records.
Flushing the DNS cache of Mac OS X differs from which version you are running of Mac OS X.
In both cases you need to start Terminal to run these commands.
For Leopard / Snow Leopard
sudo dscacheutil -flushcache
Note, you might need your password for the above command.
For Tiger
lookupd -flushcacheYou alternatively might want to download the application MainMenu and give it a try... This gives you the ability to use menu's instead of commands in Terminal.




