OS X Flush DNS Cache

Thursday, December 27, 2012

Mac OS X, now just OS X, seems to change the way the DNS cache is flushed every couple of releases.

Below are the various commands to flush the DNS cache from Mac OS X 10.4 Tiger to OS X 10.9 Mavericks.

OS X 10.9 Mavericks

Apparently in Mavericks this is a two step process.

Flush the DNS cache:

dscacheutil -flushcache

Then reload DNS:

sudo killall -HUP mDNSResponder

Mac OS X 10.7 Lion and OS X 10.8 Mountain Lion

sudo killall -HUP mDNSResponder

Mac OS X 10.5 Leopard and 10.6 Snow Leopard

sudo dscacheutil -flushcache

Mac OS X 10.4 Tiger

sudo lookupd -flushcache

References

Flush DNS in Mac OS X



comments powered by Disqus