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.