How to flush DNS Cache on Mac OS 10.5

Posted on February 09, 2009 in How-to

Finally a way to flush the DNS cache on Mac OS 10.5 "dscacheutil -flushcache". PC users have always had a way to do this with "ipconfig /flushdns" but Mac users usually had to restart. In Mac OS 10.4 there was "lookupd -flushcache" but that never quite worked 100% of the time. Here's a bit of the MAN page and a link to the complete page via

dscacheutil -- gather information, statistics and initiate queries to the Directory Service cache.

dscacheutil -h dscacheutil -q category [-a key value]
dscacheutil -cachedump [-buckets] [-entries [category]]
dscacheutil -configuration dscacheutil -flushcache
dscacheutil -statistics
dscacheutil does various operations against the Directory Service cache including gathering statistics, initiating lookups, inspection, cache flush, etc. This tool replaces most of the functionality of the lookupd tool previously available in the OS.

Mac OS X Manual Page For dscacheutil(1).