Clearing the DNS Cache in Leopard

In previous versions of Mac OS X, I could use this command to flush the DNS resolver cache:

lookupd -flushcache

However, in Mac OS X version 10.5 “Leopard,” this command no longer works!  I had an occasion today where I needed to flush the DNS resolver cache due to a configuration error in the lab.  Fortunately a quick Google search turned up this page, where I found that the correct command to use in Leopard is this one:

dscacheutil -flushcache

Works like a champ!

Tags: ,

  1. John’s avatar

    Do I just copy what you’ve written, paste it into terminal, and hit “enter”? Im trying to figure out how to flush the DNS resolver cache, but I don’t know anything about UNIX and I’ve never used Terminal. To execute a command, do you merely hit “enter”? Thanks.

  2. slowe’s avatar

    John,

    Yes, just type the command above and press Enter/Return when you’re done. That should take care of the trick.

    Thanks for reading!