How to Clear DNS Cache in Mac OSX Leopard

Advertisement

flush dns

DNS request are usually cache, that’s good as it speeds up the lookups within the same host but sometimes we will want to clear the cache so it don’t hold the values that are no longer valid. To do that in Mac (OS Tiger and below) we used the following command:

lookupd -flushcache

However a Mac OSX 10.5 Leopard user will tell you this command did not work on their terminal. In Leopard a new command has been used to replace flushcache, so to clear DNS cache in Leopard, just type this in your Terminal and hit enter.

dscacheutil -flushcache

Related Contents

Sponsors

Posted by hongkiat in Mac Tips , at 01.09.08

Tags: , , ,

Comments

  1. Eris January 25th, 2008

    Thanks, my college uses a capture page for logging into the wireless network and the first page opened redirects there so I was ending up with google.com cached as 1.1.1.1.

    Reply
  2. Brett February 14th, 2008

    I don’t know why, but I end up having to google this page every week or so. Never had this issue with Tiger, but thanks to this page being #1 in Google it’s pretty easy to fix ;)
    Thx.

    Reply
  3. biscket July 17th, 2008

    its very helpfull to me

    Reply
  4. bitcher August 13th, 2008

    Useful especially if you use P2P clear the cache and watch your dl rate soar!!

    thanks

    Reply
  5. Carlos @ webbynode October 27th, 2008

    We just got new macs for everyone in here, and I was still using the old one ;)

    Thanks.

    Reply
  6. psps November 5th, 2008

    it doesnt fix the google problem for me :(

    Reply
  7. Antonie Potgieter April 1st, 2009

    Thank you. It helped me when my ISP went down and I couldn’t open certain websites.

    Reply
  8. Brad April 17th, 2009

    Whoohoo, finally found this. Thanks for the post! I just got my mac and couldn’t figure this out for the life of me.

    Reply
  9. Tony Moore December 12th, 2009

    PUT THIS info dscacheutil -flushcache WHERE????????????
    Specifics Please

    Reply
  10. Adam January 9th, 2010

    @Tony Moore
    Open up the application called “Terminal”
    then (without the quotes) type “dscacheutil -flushcache”
    press enter

    that should clear your DNS cache

    Reply

Leave a reply