Flush DNS Cache on macOS, Linux, or Windows
Published December 27, 2012
• Updated April 30, 2023
The various commands to flush the DNS cache on macOS, Linux, or Windows.
OS X 10.9 Mavericks to macOS 13 Ventura
Flush the DNS cache then reload DNS, in a one-liner:
dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Mac OS X 10.7 Lion and OS X 10.8 Mountain Lion
sudo killall -HUP mDNSResponder
Mac OS X 10.5 Leopard and 10.6 Snow Leopard
sudo dscacheutil -flushcache
Mac OS X 10.4 Tiger
sudo lookupd -flushcache
Linux distributions using systemd
Windows 10 and Windows 11
If you found this post useful and would like to help support this site - and get something for yourself - sign up for any of the services listed below through the provided affiliate links. I will receive a referral payment from any of the services you sign-up for.
Get faster shipping and more with Amazon Prime: About to order something from Amazon but want to get more value out of the money you would normally pay for shipping? Sign-up for a free 30-day trial of Amazon Prime to get free two-day shipping, access to thousands of movies and TV shows, and more.
Thanks for reading and take care.