Uninstall CUDA on ubuntu

Many times you need to reinstall cuda, but it always fails. You need to completely uninstall the old version of cuda, and then install the new cuda.

You may need to uninstall the NVIDIA driver and cuda, use the following command:

sudo apt-get --purge remove "*cublas*" "cuda*" "nsight*" 

To uninstall the driver:

sudo apt-get --purge remove "*nvidia*"

Then execute autoremove to delete the installation directory:

sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /usr/local/cuda*

Guess you like

Origin blog.csdn.net/MrCharles/article/details/108283225