Limpiar cache DNS en Ubuntu 18.04.6 LTS

Verificar que el servicio esta activo con:

systemctl status systemd-resolved.service

Vaciar la cache de Systemd-Resolved

systemd-resolve --flush-caches

Reiniciar el servicio

sudo systemctl restart systemd-resolved.service