If you no longer need an NVIDIA Tesla driver due to a specific reason, you must uninstall the driver based on the OS of the driver.
Warning You can use GPU-accelerated instances only if they are configured with the required drivers. After you uninstall a driver from your GPU-accelerated instance, you must install a new driver that is compatible with the instance type and OS at the earliest opportunity to ensure business continuity.
Uninstall a Tesla driver from Windows
This section describes how to uninstall a Tesla driver from Windows. In this example, a Tesla driver of version 472.50 is uninstalled from a GPU-accelerated compute-optimized instance that belongs to the gn6i instance family and runs Windows Server 2019.
Connect to the GPU-accelerated instance.
In the lower-left corner of your Windows desktop, click the icon and click Control Panel.
In the Control Panel dialog box, click Uninstall a program in the Programs section.
Find the Tesla driver that you want to uninstall, such as NVIDIA Graphics Driver 472.50
, right-click the driver, and then click Uninstall/Change.
In the NVIDIA Uninstaller dialog box, click UNINSTALL.
After you uninstall the driver, click RESTART NOW.
After the restart is complete, the Tesla driver is uninstalled.
Uninstall a Tesla driver from Linux
The method for uninstalling a Tesla driver varies based on the installation method of the driver. You must select a method to uninstall your Tesla driver based on the installation scenario of the driver. In this example, a Tesla driver of version 470.161.03 and CUDA 11.4.1 are uninstalled.
Note To uninstall a Tesla driver from Linux, you must log on to Linux as a root
user. If you are a regular user, you must run the sudo
command to obtain the root
permissions before you uninstall the driver.
Step 1: Uninstall nvidia-fabricmanager
This step is required only when your GPU-accelerated instance belongs to the ebmgn7 or ebmgn7e instance family. In this example, a Tesla driver of version 470.161.03 is uninstalled.
Important If your GPU-accelerated instance does not belong to the ebmgn7 or ebmgn7e instance family, skip Step 1 and perform Step 2.
Run the following commands to stop nvidia-fabricmanager:
systemctl stop nvidia-fabricmanager
systemctl disable nvidia-fabricmanager
Run the following commands to uninstall the installation package of nvidia-fabricmanager:
The commands vary based on your OS.
CentOS or Alibaba Cloud Linux
# Run the following command to view the name of the installation package:
rpm -qa | grep nvidia-fabric-manager
# Run the following command to uninstall the package:
rpm -e nvidia-fabric-manager-470.161.03-1.x86_64
Ubuntu
# Run the following command to view the name of the installation package:
dpkg --list |grep nvidia-fabricmanager
# Run the following command to uninstall the package:
apt remove nvidia-fabricmanager-470
Step 2: Uninstall a Tesla driver
If you use a specific type of installation package such as a .run, .deb, or .rpm installation package to install a Tesla driver on an OS such as Ubuntu, CentOS, Alibaba Cloud Linux, or SUSE, perform the following operations to uninstall the Tesla driver based on the installation scenario of the driver.
Scenario 1: The Tesla driver is installed by using a .run installation package.
If the Tesla driver is automatically installed when you create a GPU-accelerated instance, perform the following operations to uninstall the driver by using the .run installation package. In this example, a Tesla diver of version 470.161.03 and CUDA 11.4.1 are uninstalled.
Run the following command to uninstall the Tesla driver:
/usr/bin/nvidia-uninstall
Run the following commands to uninstall CUDA:
/usr/local/cuda/bin/cuda-uninstaller
rm -rf /usr/local/cuda-11.4
Note The commands that you run to uninstall a driver may vary based on the CUDA version. If you cannot find the cuda-uninstaller file, check whether a file whose name contains the uninstall_cuda prefix exists in the /usr/local/cuda/bin/ directory. If the file whose name contains the uninstall_cuda prefix exists, replace cuda-uninstaller in the preceding command with the name of the file.
Run the following command to restart the instance:
Scenario 2: The Tesla driver is installed by using a .deb installation package.
If you use a .deb installation package to install a Tesla driver on Ubuntu, perform the following operations to uninstall the driver. In this example, a Tesla driver of version 470.161.03 and CUDA 11.4.1 are uninstalled.
Run the following commands to uninstall CUDA:
apt-get --purge remove "*cuda*" "*cublas*" "*cufft*" "*cufile*" "*curand*" \
"*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*"
rm -rf /usr/local/cuda-11.4
Run the following command to uninstall the Tesla driver:
apt-get --purge remove "*nvidia*" "libxnvctrl*"
Run the following command to uninstall and clean all installation packages:
Run the following command to restart the instance:
Scenario 3: The Tesla driver is installed by using a .rpm installation package.
The method to uninstall a Tesla driver varies based on the OS on which you use a .rpm installation package to install the driver.
CentOS 7 or Alibaba Cloud Linux 2
If you install a Tesla driver by using a .rpm installation package on CentOS 7 or Alibaba Cloud Linux 2, perform the following operations to uninstall the driver. In this example, a Tesla driver of version 470.161.03 and CUDA 11.4.1 are uninstalled.
Run the following commands to uninstall CUDA:
yum remove "cuda*" "*cublas*" "*cufft*" "*cufile*" "*curand*" \
"*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*"
rm -rf /usr/local/cuda-11.4
Run the following command to uninstall the Tesla driver:
Run the following command to restart the instance to complete the uninstalling process:
CentOS 8 or Alibaba Cloud Linux 3
If you install a Tesla driver by using a .rpm installation package on CentOS 8 or Alibaba Cloud Linux 3, perform the following operations to uninstall the driver. In this example, a Tesla driver of version 470.161.03 and CUDA 11.4.1 are uninstalled.
Run the following commands to uninstall CUDA:
dnf remove "cuda*" "*cublas*" "*cufft*" "*cufile*" "*curand*" \
"*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*"
rm -rf /usr/local/cuda-11.4
Run the following command to uninstall the Tesla driver:
dnf module remove --all nvidia-driver
Run the following command to reset the Tesla driver:
dnf module reset nvidia-driver
Run the following command to restart the instance:
SUSE
If you install a Tesla driver by using a .rpm installation package on SUSE, perform the following operations to uninstall the driver. In this example, a Tesla driver of version 470.161.03 and CUDA 11.4.1 are uninstalled.
Run the following commands to uninstall CUDA:
zypper remove "cuda*" "*cublas*" "*cufft*" "*cufile*" "*curand*" \
"*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*"
rm -rf /usr/local/cuda-11.4
Run the following command to uninstall the Tesla driver:
Run the following command to restart the instance: