Flush Your DNS Cache

Created at 2018-10-10 Updated at 2020-06-10 Tag Linux Mint

TL;DR

Here are two ways to clear your DNS cache in Linux Mint 19:

1. Using systemd-resolve

sudo systemd-resolve --flush-caches

2. Using dns-clean

sudo /etc/init.d/dns-clean start

Source

The Rest of the Story

So this is more for me to have this documented. Yeah, I could make a bookmark, but you never know ;-)

First off, I'll say that I shamelessly took all of this information from this post, so a big thank you to that author.

I'm using Linux Mint 19, but as the original article says, this works in vanilla Ubuntu 18.04 LTS as well.

There are a couple of different ways to clear your DNS cache, and here they are:

1. Using systemd-resolve

sudo systemd-resolve --flush-caches

And you can verify that worked by running the command below, and verifing that the “Current Cache Size” is “0” (zero).

sudo systemd-resolve --statistics

2. Using dns-clean

sudo /etc/init.d/dns-clean start

That's it, no need to restart your computer; your DNS cache is clear!

End of Line.

Site by Aaron von Awesome using Hexo & Random