Technology Tips and tricks

How to flush DNS cache in OSX

Flush DNS cache osx el capitan 10.11

One common question has been floating around the web since OSX El Capitan came out. “How to flush dns cache in OSX 10.11 El Capitan”? The get your networking fixed, you need to sometimes flush the dns cache in OSX. It requires terminal use and appropriate user level.

Open terminal from spotlight and type the following commands to flush dns cache:

Clearing DNS Caches in OS X El Capitan (10.11)

sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say flushed 

Clearing DNS Caches in OS X Yosemite (10.10, 10.10.1, 10.10.2, 10.10.3)

sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches;say flushed

OS X Mavericks (10.9)

dscacheutil -flushcache; sudo killall -HUP mDNSResponder

OS X Mountain Lion (10.8)

sudo killall -HUP mDNSResponder

OS X Lion (10.7)

sudo killall -HUP mDNSResponder

OS X Snow Leopard (10.6)

sudo dscacheutil -flushcache

OS X Leopard (10.5)

sudo dscacheutil -flushcache

OS X Tiger (10.4)

lookupd -flushcache

Sponsors