How to uninstall cuda 12.4

Hi,

i am trying to uninstall cuda 12.4 because I need cuda 12.1, as this version is supported by pytorch.

The documentation says uninstalling will work via

sudo /usr/local/cuda-12.4/bin/cuda-uninstaller

However, I have

ls /usr/local/cuda/bin
bin2c              crt       cuda-gdbserver  fatbinary  nsight_ee_plugins_manage.sh  nsys-ui              nvcc.profile  nvprof   ptxas
computeprof        cudafe++  cu++filt        ncu        nsight-sys                   nvcc                 nvdisasm      nvprune
compute-sanitizer  cuda-gdb  cuobjdump       ncu-ui     nsys                         __nvcc_device_query  nvlink        nvvp

and

s /usr/local/cuda-12/bin
bin2c              crt       cuda-gdbserver  fatbinary  nsight_ee_plugins_manage.sh  nsys-ui              nvcc.profile  nvprof   ptxas
computeprof        cudafe++  cu++filt        ncu        nsight-sys                   nvcc                 nvdisasm      nvprune
compute-sanitizer  cuda-gdb  cuobjdump       ncu-ui     nsys                         __nvcc_device_query  nvlink        nvvp

ls /usr/local/cuda-12.4/bin
bin2c              crt       cuda-gdbserver  fatbinary  nsight_ee_plugins_manage.sh  nsys-ui              nvcc.profile  nvprof   ptxas
computeprof        cudafe++  cu++filt        ncu        nsight-sys                   nvcc                 nvdisasm      nvprune
compute-sanitizer  cuda-gdb  cuobjdump       ncu-ui     nsys                         __nvcc_device_query  nvlink        nvvp

so, no uninstaller available.

BTW, is it normal to have cuda, cuda-12 and cuda 12.4 or did I wrongly install too many versions?

Thank you

If you installed cuda using the package manager, you’ll also have to use it to uninstall.

Deleting the directory where all the cuda configs are located seemed to work for me

sudo rm -r /usr/local/cuda-12.4/

sudo apt clean && sudo apt autoclean