12

Trying to flush the local DNS cache. How is this done on Snow Leopard?

Using System Preferences and using the terminal?

Chealion
  • 8,018
  • 5
  • 37
  • 46
jdiaz
  • 1,712
  • 2
  • 19
  • 19

2 Answers2

17

Use

sudo dscacheutil -flushcache

or

sudo killall -HUP mDNSResponder

In 10.6 the handling of Unicast DNS is now managed by mDNSResponder - dscacheutil -flushcache now just tells mDNSResponder to restart (the second command above).

the
  • 1,335
Chealion
  • 8,018
  • 5
  • 37
  • 46
9
dscacheutil -flushcache
ghoppe
  • 8,046
  • can it be done via pref pane? – jdiaz Sep 09 '10 at 20:34
  • 2
    @jdiaz No. There is no option in System Preferences to flush the DNS cache. – ghoppe Sep 09 '10 at 21:28
  • 1
    After I upgraded to OS X Lion, dscacheutil -flushcache does not seem to work anymore on my system. Using Chealion's suggestion of sending a HUP signal to mDNSResponder does still work for me though. –  Aug 05 '11 at 11:47