Home Issue How to Clear the DNS Cache on Mac

How to Clear the DNS Cache on Mac

Posted: April 1, 2021

If you are experiencing issues with your Internet frequently, and you have a habit of looking for troubleshooting tips online, then you may have noticed that flushing or clearing the DNS cache is one of the first recommended tips. However, most articles tell you how to do this on Windows, and do not mention a guide for Mac users. If you wish to learn how to do this on Mac, then keep on reading to find out how to clear the DNS cache.

This task is always carried out through the Terminal utility, but you may need to use a specific command depending on your macOS version. Once you know your operating system's version, you can use the following commands in the Terminal:

  • sudo killall -HUP mDNSResponder;sleep 2; for Mojave, Catalina, Big Sur, and above.
  • sudo killall -HUP mDNSResponder;say DNS cache has been flushedfor macOS Sierra
  • sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say cache flushedfor El Capitan and Yosemite.

Loading...