Clearing DNS Caches in Early Versions of Mac OS X (10.3, 10.2, 10.1)
Anytime you visit a website or do any other kind of DNS lookup, the IP address conveniently gets cached. While what’s convenient for most of us can be a real nuisance for others, particularly administrators who are moving around servers. This set of quick tips that Systems Administrators (and others) will surely appreciate covers flushing DNS caches in early release versions of Mac OS X system software, like 10.4, 10.3, 10.2, 10.1, and 10.0 (!).
If you’re on a new version like OS X 10.10.x Yosemite or later, don’t worry, we’ll link to how to do the DNS dump there too.
First off, clearing the DNS cache in Mac OS X always requires to be done from the Terminal. The command is what changes in versions of OS X. Thus, use the following commands depending on the version of OS X in use on the system.
Clearing DNS in Old Releases of Mac OS X like 10.4, 10.3, 10.2
In versions of Mac OS X as far back as Mac OS X 10.4, Mac OS X 10.3, Mac OS X 10.2, Mac OS X 10.1 you can use the simple lookupd command:
No other work is required, the DNS will dump its cache and that’s it.
Apple changed things in later versions of Mac OS X however, with Mac OS X 10.5 Leopard you would need to use the dscacheutil and this syntax instead:
Again once you hit return that’s it.
As you’ve probably guessed, later versions of OS X changed YET AGAIN how to flush out the DNS cache on nearly every version of Mac OS X that Apple has put out.
- Flushing DNS caches in OS X Yosemite (10.10.x) and newer with discoveryutil
- Flushing DNS cache in OS X 10.9 Mavericks, 10.8 Mountain Lion, 10.7 Lion, 10.6 Snow Leopard
It’s possible that Apple will adjust DNS configuration again in the future so be sure to bookmark OSXDaily.com, we’ll be sure to cover it.