Resource icon

Clear DNS Cache

  • Hi there and welcome to PC Help Forum (PCHF), a more effective way to get the Tech Support you need!
    We have Experts in all areas of Tech, including Malware Removal, Crash Fixing and BSOD's , Microsoft Windows, Computer DIY and PC Hardware, Networking, Gaming, Tablets and iPads, General and Specific Software Support and so much more.

    Why not Click Here To Sign Up and start enjoying great FREE Tech Support.

    This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  • Hello everyone We want to personally apologize to everyone for the downtime that we've experienced. Due to the issues we've had, your password will need to be reset. Please click the button that says "Forgot Your Password" and change it. Thanks, PCHF Management
In Windows and Linux, clearing the cache is pretty straightforward. But in OS X, it's not quite that simple. Below is a guide on how to accomplish this.

1.) Open Terminal.


2.) For OS X v10.10.4 and above (Yosemite), you can run

Code:
killall -HUP mDNSResponder

and it'll reset the cache for you.

3.) For OS X v10.10 through 10.10.3 (Yosemite), use

Code:
discoveryutil mdnsflushcache

4.) For OS X v10.9.5 and earlier (Mavericks, Mountain Lion, and Lion), use

Code:
killall -HUP mDNSResponder

5.) For OS X v10.5.2 through v10.6.8 (Snow Leopard), use

Code:
dscacheutil -flushcache

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

If you don't want to manually enter these commands, you can instead use a Bash script to accomplish this. Use the following script

Code:
alias flushdns="curl -Ls 'https://raw.githubusercontent.com/OwlReporter/OwlMac/master/Scripts/FlushDNS.sh' | sudo sh"

and then you can use:

Code:
flushdns

to flush the DNS. This code will fetch the latest bash script in case a new command is needed in future releases of OS X to flush the DNS.
Author
jmarket
Views
1,148
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from jmarket