본문 바로가기
ML or DL/개발환경

[딥러닝 개발환경] Ubuntu 환경 CUDA 삭제

by chaloalto 2022. 5. 12.

Ubuntu 환경에서 설치되어있는 CUDA 를 삭제하기 위한 방법 

출처 : https://askubuntu.com/questions/530043/removing-nvidia-cuda-toolkit-and-installing-new-one 

 

Removing Nvidia CUDA Toolkit and installing new one

I installed the CUDA 5.5 package on Ubuntu 14.04 (which is not supported for this version of Ubuntu version) , and I didn't do it well. I want to remove what I've installed earlier and install a new

askubuntu.com

0. 설치되어 있는 CUDA 버전 확인

nvcc --version
>>nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176

nvcc 동작하지 않을시, 

ls /usr/local/ | grep cuda

1. 디렉토리 이동 

CUDA 9.0 버전이 설치되어있다고 가정할 때, 해당 디렉토리로 이동

cd /usr/local/cuda-9.0/bin

2. Uninstall 파일 실행 권한 부여 및 실행

디렉토리에 uninstall_cuda_9.0.pl 파일이 존재

 

chmod +x uninstall_cuda_9.0.pl # 실행권한 부여
sudo ./uninstall_cuda_9.0.pl # 실행