flush dns ubuntu 18.04

Shell
sudo systemd-resolve --flush-cachessudo systemctl restart nscd
Source

Also in Shell: