


I have ubuntu 18.04, and accidentally installed cuda 9.1 to run Tensorflow-gpu, but it seems tensorflow-gpu requires cuda 10.0, so I want to remove cuda first by executing: :~$ sudo apt-get remove -auto-remove nvidia-cuda-toolkit I solved this issue as follow : sudo apt-get purge nvidia*Ĭheck all the options and then it will be uninstalled automatical References: Nvidia uninstallation Solution 2 Go to the line containing reference to Nvidia repo and comment it by appending # in front of the line, for e.g.: #deb / Run the following to delete it: sudo vim /etc/apt/sources.list If you get the problem of broken packages, it has happened since you added repo to the apt/sources.lst. Sudo /usr/local/cuda-11.4/bin/cuda-uninstaller Use it for the uninstallation instead: # To uninstall cuda 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*įrom cuda 11.4 onwards, an uninstaller script has been provided. To remove Nvidia drivers: sudo apt-get -purge remove "*nvidia*" To remove cuda toolkit: sudo apt-get -purge remove "*cublas*" "cuda*" "nsight*" If you have installed using apt-get use the following to remove the packages completely from the system:
NVIDIA CUDA TOOLKIT UNINSTALL DRIVERS
There are two things- nvidia drivers and cuda toolkit- which you may want to remove.
