How to flush / clean DNS cache in Linux
By BlueT on Thursday 2009 September 24, 15:45 - Ubuntu - Permalink
Sometimes your system caches too much on DNS query / records.
DNS caching helps alot on reducing time and bandwidth when your application
needs DNS informations,
but just like anything else in the world; it's not a good thing when it does
too over.
Let's see how to flush DNS cache in your system.
In Ubuntu:
$ sudo /etc/init.d/dns-clean restart
For Others:
Flush nscd DNS cache:
$ sudo /etc/init.d/nscd restart
OR
$ sudo service nscd restart
OR
$ sudo service nscd reload
OR
$ sudo nscd -i hosts
Flush dnsmasq dns cache
$ sudo /etc/init.d/dnsmasq restart
Flush caching BIND server dns cache
$ sudo /etc/init.d/named restart
OR
$ sudo rndc flush
Refs: How To
Flush Linux / UNIX DNS Cache