There could be all sorts of reasons why you may need to flush out the DNS cache on your Mac. For instance, if your Mac is faced with a persistent issue or when the hosts file seems to be corrupted/needs modifications, you may be recommended to reset the DNS cache. Considering how effective it is in terms of fixing issues, I thought it would be better to create a hands-on guide on how to clear the DNS cache in macOS 14 Sonoma on Mac. So, follow along to learn how it’s done.
How to Flush DNS Cache on Mac in macOS 14 Sonoma or later
Thanks to the built-in app called “Terminal”, it’s pretty straightforward to flush out DNS on macOS. So, even if you are not an advanced user, you can sail through the process without any hassle.
For those unfamiliar, resetting DNS cache on Mac comes in handy for pro users. It enables them to fine-tune DNS settings or carry out the development work.
Step 1. First off, open the Terminal app on your Mac. To do so, head over to Finder -> Applications -> Utilities -> Terminal.
The quickest way to open this app is to use the Spotlight search. Just press the Command+Spacebar keys to bring up the Spotlight search -> enter Terminal and launch it.
Step 2. Now, copy the following command string and paste it into the command line prompt in the Terminal app.
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Step 3. Next, press the Return key.

Step 4. When prompted for the admin password, make sure to enter it. Then, hit the return key again.
Note:
- It’s worth pointing out that the Terminal app does not display passwords when typed as a security precaution. Since this is done intentionally, just input the password without any confusion.
That’s it! You have successfully flushed and reset the DNS cache on your macOS. Since the Terminal app does not offer any confirmation, many (especially the newbies) are left wondering whether or not the process has been completed. So, you shouldn’t bother about the completion of the process. Now, quit Terminal and then get back to your daily chores.
Frequently Asked Questions
Q 1. Where is my DNS cache in Mac?
The quickest way to find the DNS cache is to use the Terminal app. You can use this “dscacheutil -statistics” command to view the DNS cache on your macOS device.
Q 2. Why do I need to clear the DNS cache on Mac?
Flushing the DNS cache helps in keeping the information up to date which plays a vital role in enhancing security. Moreover, it also keeps threats like DNS cache poisoning, network security threats, and malicious attacks at a fair distance.
Read more: 16 Best Tips to Use Stage Manager in macOS 13 Ventura on Mac