Flushing DNS cache on Fedora


just curious how flushing of DNS is done on Fedora these days. Would be useful.
Would anyone please be able to provide me with a method on how to do that?



It depends on your resolver:

cat /etc/resolv.conf

In general case, you need to restart the resolver service or invoke the resolver-specific command, e.g. in case of systemd-resolved:

sudo resolvectl flush-caches

In other cases you need to do nothing as it is not cached on your PC, however it may be cached on your router.

Hey, thanks for the reply!

It appears that systemd-resolved isn’t enabled by default.
Do you know what Fedora uses by default?


I don’t think it uses anything so there should be no dns cache.

1 Like

Fedora has no DNS cache system by default at all, so there’s nothing to flush. If you’re running into issues, it may be that your browser has its own DNS cache; e.g., Chrome lets you clear its own cache via chrome://net-internals/#dns.

1 Like

If you use a custom DNS nameserver, that could also interfere. For example, a VPN program I use modifies my /etc/resolv.conf automatically to change the nameserver to protect DNS traffic. In my case, a site I wanted to visit had bad DNS records cached in the nameserver.