How to flush DNS cache in Linux / Windows / Mac
Flush dns to get a new name resolution. Also flush dns cache when you can’t access a newly registered domain name. You can simply flush your dns cache anytime to get new entry. So, Flush your dns cache now.
To flush DNS cache in Microsoft Windows (Win XP, Win ME, Win 2000):-
- Start -> Run -> type cmd
- in command prompt, type ipconfig /flushdns
- Done! You Window DNS cache has just been flush.
To flush the DNS cache in Linux, restart the nscd daemon:-
- To restart the nscd daemon, type /etc/rc.d/init.d/nscd restart in your terminal
- Once you run the command your linux DNS cache will flush.
To flush the DNS cache in Mac OS X Leopard:-
- type lookupd -flushcache in your terminal to flush the DNS resolver cache.
ex: bash-2.05a$ lookupd -flushcache
- Once you run the command your DNS cache (in Mac OS X) will flush.
To flush the DNS cache in Mac OS X:-
- type dscacheutil -flushcache in your terminal to flush the DNS resolver cache.
ex: bash-2.05a$ dscacheutil -flushcache
- Once you run the command your DNS cache (in Mac OS X Leopard) will flush.
Do you want a dedicated hosting server that won’t let you down? Sign online today and learn all about dedicated servers. If you want to host a website, you need a host that won’t let you down. You need a dedicated server that will maintain power through high traffic. Do your research on exchange server hosting!
Posted at September 28th, 2006 by chua
If you think this article helps you to solve your problem and clear your headache, feel free to buy me a drink :)









February 9th, 2007 at 11:57 pm
On my Debian machine, the nscd daemon is not installed by default. (/etc/rc.d/init.d/nscd missing)
Description:
A daemon which handles passwd, group and host lookups
for running programs and caches the results for the next
query. You should install this package only if you use
slow Services like LDAP, NIS or NIS+
So i think “/etc/init.d/network restart” does also clear the cache. Does anyone know a better solution, let me know
April 3rd, 2007 at 12:45 pm
ipconfig /flushDNS dos not work with Windows 9x\ME
May 30th, 2007 at 7:38 am
[...] | DosBit - Techie Corner Publicaciones [...]
August 3rd, 2007 at 9:37 pm
this does NOT flush firefox internal cache.
August 7th, 2007 at 11:15 am
gabriel: this only flush ur pc dns cache. if you wan to clear Firefox internal cache, you can open firefox -> Tools -> Clear Private Data (Check the cache) and click “Clear Private Data Now”
September 1st, 2007 at 9:46 pm
i think gabriel means the internal firefox dns cache (yes firefox has it’s own dns cache… unnecessarily)
but i don’t know how to flush it… the only thing i can change, is the expiration interval.
September 12th, 2007 at 8:45 am
Normally the internal firefox cache will be clear once you close all the browser.
October 3rd, 2007 at 10:52 am
firefox’s about:config has an option: network.dnsCacheEntries
setting this to 0 will disable the cache and fallback to the local DNS cache.
October 24th, 2007 at 11:26 am
Hello Sir………..
To whom ever it may concern……………
Can you give me a solution for this………
Here we are using Terminal server with more than 50 clients at a time……..
but when i shutdown and restart that server then it will shows some errors
“IEXPLORER has encounter a problem”…………. Please can you give me a solution for this…………….. And we are using Domain environment also. Please give a solution for this……
October 27th, 2007 at 10:11 pm
Can someone help…! I can’t Clear my Cache…
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Dad>ipconfig /flushdns
Windows IP Configuration
Could not flush the DNS Resolver Cache: Function failed during execution.
C:\Documents and Settings\Dad>
November 1st, 2007 at 11:41 pm
Sam, which version of firefox has that option?
I cannot locate it in my about:config
January 12th, 2008 at 5:46 am
Hey dad.. try this.
1. Click the Microsoft Vista Start logo in the bottom left corner of the screen
2. Click All Programs
3. Click Accessories
4. RIGHT-click on Command Prompt
5. Select Run As Administrator
6. In the command window type the following and then hit enter: ipconfig /flushdns
7. You will see the following confirmation:
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
March 19th, 2008 at 5:08 am
/etc/init.d/network restart
Will clear the cache on Linux.
April 6th, 2008 at 5:46 pm
in MacOSX Leopard 10.5.2 its :
dscacheutil -flushcache
April 6th, 2008 at 11:44 pm
bash-2.05a$ lookupd -flushcache
When I try this on my Mac I get a command not found?
ryan-imac:~ ryan$ bash-2.05a$ lookupd -flushcache
-bash: bash-2.05a$: command not found
ryan-imac:~ ryan$
June 22nd, 2008 at 10:28 pm
[...] rnrn rn rn rn Re: flush DNS on Linuxrn rn rn rn rn rn Does this help?rnrnHow to flush DNS cache in Linux / Windows / Mac - Techie Cornerrn rn rn rn rn rnrn rn rn rn __________________rn Marcel Coxrn rn rn [...]
July 12th, 2008 at 6:15 pm
Ryan,
that’s because the headings for the two Mac OS X commands are around the wrong way.
If you’re using 10.5, use: dscacheutil -flushcache
Also, you want everything after the $ sign. The rest is what is written before the command prompt.
July 19th, 2008 at 7:34 am
I can’t flush my dns cache in win98.
ipconfig/flushdns is a bad command
I am unable to get to certain websites on both ie and firefox
I was able to get to the sites at one time, but once I get the server not found message i can’t get to the site.
Thanks for any help