Back to commands

DNS

sudo dscacheutil -flushcache

Flush the DNS cache on macOS.

Explanation

This command clears the macOS DNS cache. It is often paired with a DNS service restart on some macOS versions.

Syntax

sudo dscacheutil -flushcache

Flush macOS DNS cache

sudo dscacheutil -flushcache

You may be prompted for your Mac password.

Related Guides

Related Tools