Flush DNS on macOS Tahoe
While not normally required, you may in rare circumstances find it useful to flush the DNS cache on your Mac. For example, you might experience undesirable DNS settings which persist despite all efforts to remove them through conventional means.
Flush DNS
NOTE: An iPhone sharing cellular data via USB is being used as an example here. Replace “iPhone USB” as needed.
sudo networksetup -setdnsservers "iPhone USB" Empty
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
Verify DNS
scutil --dns