Here’s how to flush the DNS cache (depending of the OS):


In OS X

For OS X 10.6 and later:

$ sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

For OS X 10.5 and earlier:

$ sudo lookupd -fluscache

In Windows
ipconfig /flushdns

In Linux

If using BIND

For BIND 9.2.0 and later:

# rndc flush

For earlier versions of BIND:

# rndc restart

If using dnsmasq

Restart the service using either:

# service dnsmasq restart

or

# /etc/init.d/dnsmasq restart

For nscd

Restart the service using either:

# service ncsd restart

or

# /etc/init.d/nscd restart