ToggleHosts
Flush DNS on macOS Sonoma (14): Exact Command (2026)

Flush DNS on macOS Sonoma (14): Exact Command (2026)

2 min read

Flush DNS cache on macOS 14 Sonoma with sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder — verify resolution, clear browser DNS, fix stale hosts edits.

Manage hosts files without the terminal

ToggleHosts helps you manage environments visually on Windows, macOS, and Linux, with automatic DNS flush and backups.

Direct answer: On macOS 14 Sonoma, flush DNS with:

BASH
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder

Run it after hosts edits, DNS server changes, or when a local domain still hits the old IP.

Also see Sequoia · Tahoe · hub Flush DNS on Mac.

How to flush DNS on macOS Sonoma

  1. Open Terminal.
  2. Paste sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder.
  3. Authenticate with your admin password.
  4. Confirm with dscacheutil -q host -a name app.test.
  5. Hard-refresh or restart the browser.

When Sonoma users need this

  • /etc/hosts updated but Safari/Chrome ignore it
  • Switching client environments on an older-but-supported Mac
  • ISP DNS vs Cloudflare/Google resolver changes
  • Staging IP tests before public DNS propagation

Still broken after flush? hosts not working after edit · check VPN/AdGuard/MagicDNS.

Verify and browser caches

BASH
dscacheutil -q host -a name app.test
ping -c 1 app.test
BrowserClear host DNS
Chromechrome://net-internals/#dns
Firefoxabout:networking#dns
SafariQuit app after system flush

Automate flush on Apply

If Sonoma hosts switches are frequent, use a GUI hosts manager that can flush after Apply — ToggleHosts (4.99 €, one-time).

Bottom line

Sonoma flush DNS uses the same modern command as Sequoia/Tahoe: sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder.

Try ToggleHosts · All Mac versions

Share this article

Frequently Asked Questions

Run sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder in Terminal.

No. Sonoma, Sequoia, and Tahoe use the same modern flush command. Use this page when you search for Sonoma-specific results.

macOS caches lookups. Without a flush, browsers can keep the previous IP even though /etc/hosts is updated.

Yes. Flushing clears cached lookups; the next request resolves fresh from hosts/DNS. It does not delete your hosts file.

Related Articles