Flush Your DNS Cache (updated 2023)
TL;DR
Here is how you can clear your DNS cache in Linux Mint 21 (updated part):
|
|
Here are two ways to clear your DNS cache in Linux Mint 19 (for posterity):
1. Using systemd-resolve
|
|
2. Using dns-clean
|
|
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 ;-) The original commands for Linux Mint 19 came from this post, so a big thank you to that author. I was using Linux Mint 19, and as the original article says, the old commands worked in vanilla Ubuntu 18.04 LTS as well.
The new commands, well, I forget where I originally found them 😇️.
Here are the different ways to clear your DNS cache.
In Linux Mint 21 (updated part):
|
|
This can be verified by running:
|
|
And the results for that should look something like this after clearing the DNS cache:
|
|
In Linux Mint 19 (for posterity):
1. Using systemd-resolve
|
|
And you can verify that worked by running the command below, and verifying that the “Current Cache Size” is “0” (zero).
|
|
2. Using dns-clean
|
|
Conclusion
That’s it, no need to restart your computer; your DNS cache is clear!
End of Line.