Problem with Uninstalling PyTorch and CUDA

Hi everyone,
I have been working with Pytorch and recently wanted to use CUDA of my PC to benefit from GPU capabilities. I figured out that a few versions of CUDA had been installed on the Windows, which made me decide to uninstall all the versions and re-install a new one. Also, previously I had installed PyTorch via the official sitr via this command conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia .
Based on what the NVIDIA documentation says , I executed the following command in the command prompt conda uninstall cuda . Also, I unistalled the NVIDIA driver from the control panel. However, in the anaconda pkgs directory, the previous subpackages still exist, e.g, cuda-toolkit, cuda-nvrtc, cuda-libraries, cuda-nvcc etc. So my question is How can I “completely” get rid of CUDA?
I appreciate your consideration.

I don’t know which documentation you are following, but you should just uninstall the previously installed packages.

E.g. in:

conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia

you’ve installed pytorch, torchvision, and torchaudio, with the CUDA 11.7 dependency.
Run conda uninstall pytorch torchvision torchaudio and it will uninstall these tree libs.

Also note that your local CUDA toolkit won’t be used, since the conda binaries and pip wheels ship with their own CUDA runtime (unless you build custom CUDA extensions).