Get errors when uninstall nvidia driver
~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
nvidia-dkms-530 : Depends: nvidia-kernel-common-530 (>= 530.41.03) but 530.30.02-0ubuntu1 is installed
nvidia-driver-530 : Depends: nvidia-kernel-common-530 (>= 530.41.03) but 530.30.02-0ubuntu1 is installed
Recommends: libnvidia-compute-530:i386 (= 530.41.03-0ubuntu0.20.04.2)
Recommends: libnvidia-decode-530:i386 (= 530.41.03-0ubuntu0.20.04.2)
Recommends: libnvidia-encode-530:i386 (= 530.41.03-0ubuntu0.20.04.2)
Recommends: libnvidia-fbc1-530:i386 (= 530.41.03-0ubuntu0.20.04.2)
Recommends: libnvidia-gl-530:i386 (= 530.41.03-0ubuntu0.20.04.2)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
Solution:
~$ sudo dpkg --purge --force-depends nvidia-dkms-530
To remove cuda toolkit:
sudo apt-get --purge remove "*cublas*" "cuda*" "nsight*"
To remove Nvidia drivers:
sudo apt-get --purge remove "*nvidia*"
If you have installed via source files (assuming the default location to be /usr/local
) then remove it using:
sudo rm -rf /usr/local/cuda*