OS X Leopard: Flush or Clear the DNS Cache
The command used to flush the DNS cache changed in the upgrade to OS X version 10.5, Leopard. The new command is just as easy to run, if not to remember.
To improve performance in a networked operating system, DNS requests can be locally cached. This speeds up subsequent lookups for the same host name because a remote request is not required. The only problem with this is that the cache can get stale and hold values that are no longer valid. When this happens, you can sit on your hands and wait until the cache refreshes itself, or you can tell it to dump the values it has in it and look to remote servers for subsequent requests, refilling the cache.
To clear the DNS cache in Leopard, open the terminal application (search for terminal in Spotlight) and type the following command:
dscacheutil -flushcache
The dscacheutil command replaces lookupd, the Tiger command which no longer exists in Leopard. For instructions on clearing the DNS cache in Tiger or earlier versions of OS X, view this recipe. This command doesn’t require any special permissions to run and is a low-risk thing to do.









Tim Towtdi said on October 4, 2009
Thanx!
Very helpful!