I am trying to uninstall Cuda 10.1 on Ubuntu 16.04.6 LTS but I am not able to uninstall it using the instructions given on nvidia website.

I have installed CUDA 10.1 on Ubuntu 16.04.6 LTS using the instructions given here https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu-installation. I performed the installation using deb(local), i.e. using package manager. I followed installation instructions given here: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal.

Now I am trying to uninstall Cuda 10.1 as I realized Cuda 10.1 is not compatible with tensorflow 1.13. I tried the uninstalling by running the command

sudo apt-get --purge remove <package_name>

which is mentioned here: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#handle-uninstallation. Moreover I am not sure what should be the package_name in the above command. I tried with the package_name as https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal but that did not perform the uninstallation and by running the command I get below log

[1] 2314
[2] 2315
[3] 2316
[4] 2317
[2]   Done                    target_arch=x86_64
[3]-  Done                    target_distro=Ubuntu
[4]+  Done                    target_version=1604
Reading package lists... Doneloads$
Building dependency tree
Reading state information... Done
E: Unable to locate package https://developer.nvidia.com/cuda-downloads?target_os
E: Couldn't find any package by glob 'https://developer.nvidia.com/cuda-downloads?target_os'
E: Couldn't find any package by regex 'https://developer.nvidia.com/cuda-downloads?target_os'

But this does not perform uninstallation of Cuda 10.1. I still see Cuda-10.1 in /usr/local.

If someone can tell me where I am going wrong or what is correct forum to ask this question. I am new to linux environment so if I am wrong with some terminology, please correct me.

1 Answer 1


This question pops up in my google search about removing cuda toolkit for ubuntu 16.04. Though this might be too late, but it might help others. So...

I read the pages you linked (which are very helpful) and did the following. These commands seem to remove cuda 10.1 on my ubuntu 16.04 machine.

sudo apt --purge remove cuda-10.1
sudo apt autoremove
sudo apt autoclean

After these commands, about 4 - 5 GB files are removed. But like what you said, I also find there is still a directory /usr/local/cuda-10.1 remaining. Upon further checking, I see that much content in this directory has already been removed. So I just did the remove like the following line.

sudo rm -rf /usr/local/cuda-10.1

Hope this helps someone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .