Debian – How to flush the DNS cache in Debian

cachedebiandns

How can I flush the DNS cache in Debian 9.1 with KDE?

Best Answer

If using systemd-resolved as your DNS resolver (i.e. the hosts line of your /etc/nsswitch.conf file includes the word resolve and/or /etc/resolv.conf contains the line nameserver 127.0.0.53), then this command will flush its cache:

$ sudo systemd-resolve --flush-caches
Related Question