Remove any existing nvidia packages. (Note: Run this in bash, as the wildcard input to apt-get doesn't work in zsh)
sudo apt-get purge nvidia*
Update package listing and upgrade packages.
sudo apt update
sudo apt upgrade
Installing nvidia-detect to check for nvidia hardware.
sudo apt install nvidia-detect
Make sure the nvidia card(s) is connected properly.
nvidia-detect
Installing the latest nvidia drivers should be as simple as running the following command if you are using Debian Testing.
sudo apt install nvidia-driver
Reboot the machine.
systemctl reboot