
Despite the new command, the end result will remain the same as it has always been with previous versions of macOS. The following method requires the use of Terminal, along with an all-new command. Starting with macOS El Capitan and newer, Apple changed how you can manually flush the DNS cache. If you want to update DNS entries and you can’t restart your Mac or Server using macOS or OS X, use the terminal commands below (dependent on macOS or OS X version.) Flush the DNS cache in macOS Monterey and older Mac OS X versions macOS Monterey If your Mac isn’t using the latest DNS entries from your server, restarting your Mac usually updates its cached information. For example, if your DNS server has recently changed, you might need to do this. Sometimes it’s necessary to reset the cache immediately and re-query a DNS server. MacOS and OS X keep a local cache of resolved DNS queries for a time specified by the DNS server. scpt File to Your Desktop for Quick Access OS X Mountain Lion or Lion (10.7 and 10.8).

Flush the DNS cache in macOS Monterey and older Mac OS X versions.
