Flush DNS Cache on OS X

Here's the best way to flush DNS cache on OS X:

sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder; say cache flushed

Notice that last part — that's why this is the best method. You get an audible "cache flushed" almost instantaneously, and the whole process becomes that much more satisfying.

More fun variations:

sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder; say boom!
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder; say whoosh!
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder; say booyah!

Have at it. It may be silly, but it's the little things in life. Now, commence flushing!

Author avatar

About the author

New Hampshirite building web apps in Florida. Creator of Surreal CMS, Postleaf, and DirtyMarkup.

Need to get in touch? Catch me on Twitter.