Flush DNS command varies by OS per UC San Diego IT docs: Windows ipconfig /flushdns, Linux sudo systemd-resolve --flush-caches (or sudo resolvectl flush-caches), macOS sudo dscacheutil -flushcache. The team that flushes after DNS changes has fresh resolution.
Table of contents
- Why flush DNS
- Windows: ipconfig /flushdns
- Linux: systemd-resolved
- Linux: nscd
- macOS
- Verify flush worked
- Browser cache
- FAQ
Why flush DNS
DNS caches at multiple layers:
- OS resolver cache.
- Application cache (browser, etc.).
- Router/modem cache.
- Upstream DNS server cache (TTL-controlled).
Flushing the OS cache forces re-resolution. The team that flushes after DNS server changes has fresh results.
Windows: ipconfig /flushdns
Open Command Prompt as Administrator:
ipconfig /flushdns
Output: Successfully flushed the DNS Resolver Cache.
The team that uses this on Windows has fresh DNS.
Linux: systemd-resolved
On systemd-based distros:
sudo systemd-resolve --flush-caches
# or
sudo resolvectl flush-caches
Verify cache size:
systemd-resolve --statistics
The team that uses systemd-resolve has modern Linux DNS cache control.
Linux: nscd
If using nscd (Name Service Cache Daemon):
sudo /etc/init.d/nscd restart
# or
sudo systemctl restart nscd
The team that has nscd (rare on modern Ubuntu) uses this.
macOS
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
The team that uses macOS has fresh DNS.
Verify flush worked
After flushing:
# Linux
dig example.com
# Should return the new IP if DNS has changed
# Windows
nslookup example.com
The team that verifies has confirmation.
Browser cache
Browser has its own DNS cache:
- Chrome:
chrome://net-internals/#dns-> Clear host cache. - Firefox: about:config -> network.dnsCacheExpiration -> 0 (force refresh).
The team that flushes browser cache has fully fresh DNS.
FAQ
When should I flush DNS?
After changing DNS records (A, CNAME, MX). Wait for TTL to expire or flush to get fresh results immediately. The team that has a long TTL waits longer.
Does flushing DNS affect other users?
No - flushing only affects your local cache. Other users’ caches are unaffected.
What’s the difference between ipconfig /flushdns and ipconfig /release?
/flushdns clears DNS cache. /release releases the DHCP lease. The team that uses these for different purposes.
How long does DNS cache take to expire normally?
TTL-based, typically 5 minutes to 24 hours. The team that sets short TTLs has faster propagation.
Can I flush DNS remotely?
No - DNS cache is local. The team that has remote servers updates their DNS via API or remote shell.
If you are sizing the infrastructure for the kind of project this post covers, the RunxBuild hosting calculator is the right place to model the line items. The compute, the memory, the storage, the bandwidth, the database - each one is a separate number, and the team’s mental model for the platform is the sum of those numbers. The RunxBuild dashboard is where the team sees the actual usage in one place.
Useful related references: