1607 shaares
1 lien privé
1 lien privé
How to Clear the DNS Cache on Linux
We can use the resolvectl command with the statistics option to see how many records are in the cache.
resolvectl statistics
Flushing the cache removes all entries, and starts the collection process once more. If there are any, this forcibly removes incorrect and corrupt entries from the cache.
The command is simple; we use resolvectl with the flush-caches option.
resolvectl flush-caches
We're silently returned to the command line. To confirm that something has actually happened, we'll check the DNS cache statistics again.
resolvectl statistics