Flush Local DNS on Mac

Flush the DNS cach for the following Mac OS'sOS X Yosemite
Use the following Terminal command to reset the DNS cache:
sudo discoveryutil mdnsflushcache

OS X Mavericks, Mountain Lion, and Lion
Use the following Terminal command to reset the DNS cache:
sudo killall -HUP mDNSResponder

Mac OS X v10.6
Use the following Terminal command to reset the DNS cache:
sudo dscacheutil -flushcache


Author: Owen
Added: Sunday, 08 Dec, 2013
Category: Terminal

Code

//Mac OS X v10.6
dscacheutil -flushcache

//OS X Mavericks, Mountain Lion, and Lion
sudo killall -HUP mDNSResponder

//OS X Yosemite
sudo discoveryutil mdnsflushcache

Comments