How to clear DNS cache everywhere


Published: 26 March 2026

So, not everywhere.

A small collection of all the places I've had to clear the DNS cache when making changes that I also forget about.

Firefox

  1. Go to about:networking#dns
  2. Click "Clear DNS Cache"

You can also just restart Firefox.

macOS

In macOS we use some nice shell commands.

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Modern Linux (and others)

Anywhere that systemd-resolved is used

resolvectl flush-caches 

Others

ncsd

sudo systemctl restart nscd
sudo nsdc -i hosts

bind

sudo rndc flush