Updated on 2024-07-24 GMT+08:00

Uninstalling a GPU Driver from a GPU-accelerated ECS

Scenarios

You can manually uninstall the GPU driver from a GPU-accelerated ECS.

This section describes how to uninstall a GPU driver from a Windows ECS and a Linux ECS.

Uninstalling a GPU Driver from a Windows ECS

This section uses Windows Server 2016 Datacenter Edition 64-bit as an example to describe how to uninstall the NVIDIA driver (driver version: 462.31) from a GPU-accelerated ECS.

  1. Log in to the ECS.
  2. Click Start in the task bar and choose Control Panel.
  3. In Control Panel, click Uninstall a program under Programs.
    Figure 1 Uninstalling a program.
  4. Right-click the NVIDIA driver to be uninstalled and choose Uninstall/Change from the shortcut menu.
    Figure 2 Uninstalling a NVIDIA driver
  5. In the displayed NVIDIA Uninstaller window, click UNINSTALL.
    Figure 3 Confirming the uninstallation
  6. After the uninstallation is complete, click RESTART LATER.
  7. Check whether the NVIDIA driver has been uninstalled.
    1. In Control Panel, click Device Manager.
      If no NVIDIA graphics cards are not displayed under Display adapters, the driver is uninstalled successfully.
      Figure 4 Viewing Display adapters
    2. Open the cmd window of the ECS and run the following commands:

      cd C:\Program Files\NVIDIA Corporation\NVSMI

      nvidia-smi.exe

      Figure 5 Command output

      If the command output indicates that the file does not exist, the driver is uninstalled successfully.

    After the NVDIA driver is uninstalled, you can install a new NVIDIA driver without restarting the ECS.

Uninstalling a GPU Driver from a Linux ECS

For NVIDIA Tesla drivers installed using .run Packages, you are advised to perform the following steps to uninstall it.

If you use .run Packages to install the NVIDIA Grid driver, you only need to perform step 1 to uninstall the NVIDIA driver.

The following uses 64-bit Ubuntu Server 20.04 as an example to describe how to uninstall Tesla 460.73.01 and CUDA 11.2.

  1. Uninstall the NVIDIA driver.
    1. Query the path where nvidia-uninstall is stored.

      whereis nvidia-uninstall

      Generally, nvidia-uninstall is stored in the /usr/bin/ directory.

      Figure 6 Querying the nvidia-uninstall path
    2. Uninstall the driver from the path where nvidia-uninstall is stored.

      /usr/bin/nvidia-uninstall

    3. Select Yes and press Enter.
      Figure 7 NVIDIA driver uninstallation (1)
    4. Select OK and press Enter.
      Figure 8 NVIDIA driver uninstallation (2)
    5. After the driver is uninstalled, press Enter.
      Figure 9 NVIDIA driver uninstallation (3)
  2. Uninstall the CUDA and CUDA Deep Neural Network (cuDNN) libraries.
    To upgrade the CUDA driver version, uninstall the corresponding CUDA library and then install a new one with the target version.
    1. Uninstall the CUDA library.

      /usr/local/cuda/bin/cuda-uninstaller

      Generally, cuda-uninstaller is stored in the /usr/local/cuda/bin directory.

      The uninstallation command varies depending on CUDA versions. If the cuda-uninstaller file is not found, check whether a file starting with uninstall_cuda exists in the /usr/local/cuda/bin/ directory.

      If such a file exists, replace cuda-uninstaller in the preceding command with the file name.

    2. On the uninstallation page, select all options, move the cursor to Done, and press Enter.
      Figure 10 Uninstalling a CUDA driver

      If the CUDA library is uninstalled, the message "Successfully uninstalled" is displayed.

    1. Remove the CUDA and cuDNN libraries.

      rm –rf /usr/local/cuda-11.2