DNS cache may become corrupt at some point and may prevent you from resolving websites and other internet domain names if that happens. When that happens, the most common way of resolving the issues is clearing the temporary cache database. Ubuntu uses systemd-resolved, which is a system service that provides network name resolution to local applications. It implements a caching and validating DNS/DNSSEC stub resolver and responder. So, if you’re experiencing weird Internet connection issues or browsers not working opening some websites and domains, you may want to clear your DNS cache as well as your web browser stored caches. Before flushing the Ubuntu DNS cache, you may want to run a report of the current cache size. To do that, run the commands below. That should display the DNS statistics showing you all the cache in its database. Flushing Ubuntu DNS Cache Now that you know the size of the DNS cache, simply run the commands below to clear or flush the cache. If the above commands didn’t flush the DNS cache, you can also use the commands below. Or just all the commands listed here to perform a thorough cleanup. Now go and test to see if your system DNS caches are gone. Now also clear your browser cache to make sure you’re able to access network domains and other Internet websites. Hope this post helped you’re cleaning your Ubuntu desktop DNS cache. You may also like the post below: