Warning
Use a sudo-capable account, keep shell history for audit, and back up critical paths before changing boot, SSH, or package state.
What you will achieve
Clear resolver cache after DNS migrations on modern Linux desktops and servers.
1) Flush cache
sudo resolvectl flush-caches
2) Check cache stats
resolvectl statistics
3) Restart service if stale records persist
sudo systemctl restart systemd-resolved