Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2404 of /usr/share/drupal7/includes/

How to flush / clean DNS cache in Linux

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
$ sudo service nscd restart
$ sudo service nscd reload
$ 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
$ sudo rndc flush

Refs: How To Flush Linux / UNIX DNS Cache

Add new comment