Clearing the DNS cache can solve some network problems as well as prevent network security threats, malicious attacks, and DNS cache poisoning.
This article shows you how to clear your DNS cache in macOS Monterey (12.x), Big Sur (11.x), and Catalina (10.x).
1. Open a terminal window and execute the following command:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Screenshot:
2. You’ll be asked for your password. Enter it to continue:
3. Everything is done. You’ll see no output messages.
That’s it. Further reading:
- How to check your macOS version from Terminal
- How to completely uninstall Logitech Options on Mac
- How to show Safari’s Develop menu and Web Inspector
- Xcode: Change Derived Data and Archives directories
- How to Change the Default Text Encoding in Xcode
You can also check out our macOS category page for the latest tutorials and examples.