Flushing your cache on Mac OS X
Before you continue, please note that the next section is also available as a video tutorial:
Depending on whatever version of OS X you’re using, the commands to flush cache are slightly different. First, make sure your terminal is open on your computer.
Client software for SSH
Run the command below that corresponds to your OS X version once it has been opened.
10.12 (Sierra) and later versions of OS X
sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache;sudo dscacheutil -flushcache;sudo dscacheutil -flushcache;sudo dscacheutil -flushcache;sudo ds
OS X 10.11 (El Capitan) and 10.12 (El Capitan) (Sierra)
sudo killall -HUP mDNSResponder macbook$
Versions from the past
Versions 10.10.4+ of OS X 10.10 (Yosemite)
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder mDNSResponder mDNSResponder mDNSResponder mDNSResponder mDNSResponder mDNSResponder
10.10.1, 10.10.2, and 10.10.3
sudo discoveryutil udnsflushcaches macbook$
10.9 (Mac OS X) (Mavericks)
sudo killall -HUP mDNSResponder macbook$ dscacheutil -flushcache
OS X 10.7 (Lion) and 10.8 (Snow Leopard) (Mountain Lion)
sudo killall -HUP mDNSResponder macbook$
OS X 10.5 (Leopard) and 10.6 (Snow Leopard) (Snow Leopard)
dscacheutil -flushcache macbook$
10.4 (Mac OS X) (Tiger)
lookupd -flushcache macbook$
Flushing your DNS cache in Linux
In contrast to Windows and Mac OS X, most modern Linux versions do not employ a DNS resolver cache. Check the website or the forum pages for your Linux distribution to see which daemon is installed.
The Name Service Caching Daemon, on the other hand, is a commonly used DNS caching program (nscd). There’s no need to flush the cache because it’s probably not installed by default. If you’ve already installed it, use the following line in a terminal to clear the cache:
sudo service nscd restart [local]$
Alternatively, try the following commands:
/etc/rc.d/init.d/nscd stop [local]$
start /etc/rc.d/init.d/nscd [local]$