Step 1
I have removed the previously installed Nvidia driver and CUDA:
apt-get --purge remove "*cublas*" "cuda*"
apt-get --purge remove "*nvidia*"
reboot
docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#removing-cuda-tk-and-driver
Step 2
add-apt-repository ppa:graphics-drivers/ppa
apt update
aptitude full-upgrade
ubuntu-drivers devices
Step 3
apt install nvidia-driver-418
reboot
nvidia-smi