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.
Welcome to our Community
Wanting to join the rest of our members? Feel free to sign up today.
Sign up
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

killall -HUP mDNSResponder
and it'll reset the cache for you.

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

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

killall -HUP mDNSResponder
5.) For OS X v10.5.2 through v10.6.8 (Snow Leopard), use

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

alias flushdns="curl -Ls '' | sudo sh"
and then you can use:

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.
First release
Last update
0.00 star(s) 0 ratings

More resources from jmarket

Share this resource