Skip to main content

Flush DNS Cache Unbuntu

Introduction

Ubuntu caches DNS queries local. As long as the DNS address of a node does not change, this is very useful. Unless there is a change and the client should react very quickly, you have to flush/delete to cache. This manual describes hot to do that.

Method I: Flush the cache

Take a look at the cache:

resolvectl statistics

Clear the cache:

resolvectl flush-caches

Method II: Flush the cache

systemd-resolve --flush-caches
systemd-resolve --statistics

Method III: Flush the cache

killall -USR2 systemd-resolved