How to Flush DNS Cache on macOS Sequoia & Sonoma

May 21, 2025 - Leave a Comment

How to flush DNS cache on macOS Sequoia and Sonoma

If you’re running macOS Sequoia or macOS Sonoma, you might occasionally find yourself in a situation where you need to flush the DNS cache on your Mac. This can be necessary to fix DNS related issues or errors, to clear out outdated DNS settings or records, to resolve issues with certain websites, or even to have the results of a modified hosts file or some other networking component to take effect. Knowing how to flush DNS cache on MacOS can be helpful for troubleshooting some network issues without needing to reboot the entire Mac too.

While flushing DNS cache is perhaps most relevant for more advanced Mac users, it’s fairly easy to accomplish with the execution of a simple Terminal command string.

How to Flush DNS Cache in MacOS Sequoia & MacOS Sonoma

If you’re running macOS Sequoia 15.x or macOS Sonoma 14.x, here’s how you can easily flush and clear the DNS cache:

  1. Open the Terminal app on the Mac, found in the /Applications/Utilities/ folder or through Spotlight or Launchpad
  2. Use the following command string at the command line to initiate the DNS cache flush:
  3. sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

  4. Hit Return, and enter the admin password when requested
  5. Quit Terminal app when finished

You won’t see any confirmation that DNS caches have been flushed on MacOS, but if the command was executed properly then it will have been successful.

If you’re new to the Terminal, you will notice that there is no visible feedback when you’re typing your password into the Terminal, and that’s intentional as a security mechanism. Just type the admin password when requested and hit return anyway to execute the command and authenticate it.

For most users they won’t ever have a reason to flush DNS cache, but people who do certain types of web, networking, and internet development, or changing DNS or using a custom DNS solution like Surfshark DNS or Cloudflare, may need to flush their DNS caches often.

We’re emphasizing macOS Sequoia and Sonoma here, but this trick works the same in all modern versions of MacOS system software. If you have a much older MacOS version, you can find solutions here instead.

.

Related articles:

Posted by: Paul Horowitz in Command Line, Mac OS, Tips & Tricks

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site
OSZAR »