Hi. I'm on Ubuntu 24.04. How do I clear the DNS caches? I have set the NextDNS addresses…
- User
Hi. I'm on Ubuntu 24.04. How do I clear the DNS caches? I have set the NextDNS addresses as my DNS provider, allowed some IPs, but now they are still blocked, I know some cache must be cleared for the allow to work, or I have to wait, yeah?
Assistant
Yes, you'll need to clear the DNS cache for your changes to take effect. On Ubuntu 24.04, you can clear the systemd-resolved cache with:
bashsudo systemd-resolve --flush-cachesOr use the newer command:
bashsudo resolvectl flush-cachesYou might also want to restart NetworkManager:
bashsudo systemctl restart NetworkManagerIf you're still experiencing issues, browser DNS caches might need clearing too - just restart your browser or clear its cache from settings.
Would you like me to explain any of these commands in more detail?
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.