Clear the local DNS cache in :

  • Macintosh (macOS, MacOS, OS X)
  • Linux
  • Windows

 

Clear DNS Cache on a Macintosh System:

 

To open a Terminal session, in the Applications folder, open the Utilities folder. Double-click the Terminal.app, to open the application. You may be prompted for your password.


macOS Catalina (10.15.x), Mojave (10.14.x), High Sierra (10.13.x), Sierra (10.12.x)

Type the following Terminal command to reset the DNS cache in macOS:

sudo killall -HUP mDNSResponder


OS X El Capitan (10.11.x), Yosemite (10.10.4 and later), Mavericks (10.9.x), Mountain Lion (10.8.x), and Lion (10.7.x)

Type the following Terminal command to reset the DNS cache in OS X:

sudo killall -HUP mDNSResponder


OS X Yosemite (10.10 through 10.10.3)

Type the following Terminal command to reset the DNS cache:

sudo discoveryutil mdnsflushcache


Mac OS X Snow Leopard (10.6.x)

Type the following Terminal command to reset the DNS cache in OS X v10.6 through v10.6.8:

sudo dscacheutil -flushcache

 

Clear DNS Cache on a Windows System :

 

Windows

Type the following Command Prompt command to reset the DNS cache:

ipconfig /flushdns

 

 

Clear DNS Cache on a Linux System:

 

Linux (depending on what version you’re running)

Type the following Terminal command to reset the DNS cache:

/etc/init.d/named restart

/etc/init.d/nscd restart