Flushing DNS cache on MacOS Mojave Posted on November 14, 2018 by ericgharrison Something I need to do every now and then. Open a terminal, paste the command below and hit enter. You’ll need to enter your administrator password. sudo killall -HUP mDNSResponder; sleep 2; Once control returns, you’re all set.