How is the DNS cache cleared in 22.04?
The method that worked in 20.04:
systemd-resolve --flush-caches
no longer works.
How is the DNS cache cleared in 22.04?
The method that worked in 20.04:
systemd-resolve --flush-caches
no longer works.
Newer versions of Ubuntu use this syntax (run as root or with sudo
):
resolvectl flush-caches
(This will also work in Ubuntu 20.04.)
For Ubuntu 22.04 users, follow the below command to flush DNS Cache(resolvectl) :
resolvectl flush-caches
To check the cache size run the below command:
resolvectl statistics
dig
is using. – Basti Mar 28 '23 at 07:30