If you’re using nscd for caching DNS queries, then you can flush the DNScache by simply restarting the nscd service. If you use dnsmasq, you can clear the DNS using "sudo killall -HUP dnsmasq" instead.
Jun 2, 2022 · An apt-cache search systemd-resolve shows that it is in the resolvconf-admin package, but when I tried installing that package it did not install systemd-resolve. Feb 10, 2021 · We can also use it to flush the DNScache.
I want to support doing this with Ubuntu-server, Ubuntu-desktop, Centos8-desktop, and Centos7-server (nogui) I have built 4 vms of each. Aug 18, 2020 · The latest BID version allows you to clearDNScache for a specific domain as well.