Flush the DNS cache in Mac OSX

Mac OSX caches DNS resolutions for speed. To flush or clear this cache and force OSX to perform a new lookups when required, run the following command from the terminal:

dscacheutil -flushcache

With Mac OSX version 10.4 and earlier the following command will need to be issued instead:

lookupd -flushcache

Last updated: 24/06/2012