Flushing (Clearing) a Name Servers Cache
Flushing (Clearing) a Name Server s Cache
5.5.1 Problem
You want to flush bad records from a name server's cache.
5.5.2 Solution
If you run a BIND 9.2.0 or newer name server, you can flush the cache with rndc flush. With older name servers, you need to kill the name server and restart it to flush the cache. You can do that in one fell swoop with rndc restart or rndc exec.
5.5.3 Discussion
Clearing the cache is really a side effect of killing the name server, since BIND name servers only store cached data in memory. Since restarting the name server takes time, especially if the name server is authoritative for many zones, rndc flush is a better option.
If you run multiple views on your BIND 9.2.0 or newer name server, you can flush the cache in only one view using rndc flush viewname. For example:
# rndc flush internal
BIND 9.3.0 will support flushing all of the records attached to a particular domain name with rndc flushname. For example:
# rndc flushname cnn.com
5.5.4 See Also
Section 5.10 for restarting a name server with the same command-line options.