1. Home
  2. Knowledge Base
  3. How to clear the local DNS cache in Linux operating system?

How to clear the local DNS cache in Linux operating system?

Step 1: In the terminal, enter the command: sudo systemd-resolve –flush-caches

Step 2: After that, we can check the cache statistics using this command:
sudo systemd-resolve –statistics

Step 3: The last command will show the statistics of our cache in a table, at the Current Cache Size we should see 0.

Need Support?
Can't find the answer you're looking for?
Contact Support