All writing
1 min read

Clearing the DNS cache on macOS

A quick list of commands with which you can clear your DNS cache on macOS

You’re debugging some DNS changes in your network and Safari (or curl / any other tool) keeps sending requests to an old DNS entry? With these commands, you can clear your system’s DNS cache:

macOS versioncommand
>= 10.15 (Catalina)sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
<= 10.14 (Mojave)sudo killall -HUP mDNSResponder

I hope this helps 🙂