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