windows clear local dns cache code example Example 1: clearing dns cache ipconfig /flushdns Example 2: ubuntu clear dns cache sudo systemd-resolve --flush-caches