How to Clear DNS cache?

How do I clear my DNS cache for my Mac? I have found different ways for the different OS X versions, but not for Yosemite 10.10.1.


specs in case needed:

iMac (21.5-inch, Mid 2011)

2.5 GHz Intel Core i5

4 GB 1333 MHz DDR3

AMD Radeon HD 6750M 512 MB

I tried the process & coding for the latest O S listed in support forum (a sudo command for Lion), but get a warning message saying that if I continue, I could lose data and system files. Don't want to risk that!


Want to make sure I'm using the correct coding. Please advise.


Thanks

Louise

iMac (21.5-inch Mid 2011), OS X Yosemite 10.10.1

Posted on Jan 14, 2015 9:29 AM

Reply
2 replies

Jan 15, 2015 6:00 AM in response to Linc Davis

Thanks for your feedback, Linc Davis.


I have since found the solution. To clear your DNS cache with Mac OS X Yosemite, you must go to your 'app folder', click on 'utilities' and then 'terminal'.

Enter this code: sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches;say flushed


You may get a warning message, like I did. But I just entered my system password and was successful in clearing my cache, without any issues.


How to do this for other Apple OS X versions.


"When you might want to do this

OS X keeps a local cache of resolved DNS queries for a time defined by the DNS server, but sometimes it may be necessary to reset the cache immediately and re-query a DNS server. For example, you might do this after an entry on the server is changed or a new entry is added."

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to Clear DNS cache?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.