I've already tried sudo systemd-resolve --flush-caches
but it ends up showing sudo: systemd-resolve: command not found
. So, how do I flush the DNS cache in Ubuntu 22?
I've already tried sudo systemd-resolve --flush-caches
but it ends up showing sudo: systemd-resolve: command not found
. So, how do I flush the DNS cache in Ubuntu 22?
22.04 no longer comes with
systemd-resolv
and it is not installable by any packages that I can see in the default repos. Anapt-cache search systemd-resolve
shows that it is in theresolvconf-admin
package, but when I tried installing that package it did not installsystemd-resolve
.22.04 comes with
resolvectl
instead.You can use the following command to flush your caches:
Hope this helps!