Force dig to forget records

cachedigdns

I would like to let dig always forget a DNS record.
I mean if I do dig yahoo.com then I have a record back in with ttl for 1790 seconds.
Even if I have no cache service installed, next time i do the same command, the ttl have lowered.
Some how, dig do remember the answer. Is it possible to clear that, so I always get a fresh answer back?

Best Answer

dig doesn’t remember queries. But it makes use of name servers listed in /etc/resolv.conf, unless the server to be queried is specified explicitly. Such servers normally accept recursive queries and have caches for their results. So dig can receive records cached by (intermediate) servers.

Use
   dig +trace
to override this behaviour, forcing it to query an authoritative server. See dig(1) for more information.