Uninstalling the Driver
Before uninstalling the driver, ensure that no service process, including the service process in the container mapping scenario, occupies the Ascend driver node. Otherwise, the hot reset cannot take effect.
If a device has been managed by FusionDirector, the driver version displayed on the FusionDirector GUI will be updated with a delay of at most one hour after a driver is uninstalled. The version is updated immediately after the device is restarted.
Confirming the Uninstallation Modes
Query Command |
Description |
Uninstallation Mode |
---|---|---|
dpkg -l | grep Ascend or apt list ascend310* |
If the driver or firmware can be queried, the driver or firmware is installed using the .deb package. |
For details, see "With dpkg" or "With apt-get" in Uninstalling a Driver (*.deb) or Uninstalling the Firmware (*.deb). |
rpm -qa | grep npu |
If the driver or firmware can be queried, the driver or firmware is installed using the .rpm package. |
For details, see Uninstalling a Driver (*.rpm) or Uninstalling the Firmware (*.rpm). |
|
If the driver or firmware cannot be queried by running the preceding commands, the driver or firmware is installed using the .run package. |
For details, see Uninstalling a Driver (*.run) or Uninstalling the Firmware (*.run). |
Uninstalling a Driver (*.run)
The modes of uninstalling released .run packages on a host are the same. The following uses the {product name}-npu-driver_x.x.x_linux-{arch}.run package as an example to describe how to uninstall a .run driver package. Replace the package name with the actual one.
Prerequisites
The uninstallation function cannot be used before the .run installation package is installed.
Procedure
- Use PuTTY to log in to the OS CLI of the server.
- Run the following command to switch to the root user:
su - root
- Uninstall the driver in either of the following ways:
- Run the following command in any directory:
<install-path>/driver/script/uninstall.sh
<install-path> indicates the installation path of the software package. You can run the cat /etc/ascend_install.info command to query the installation path. Replace it with the actual path.
- Run the following command in the directory where the software package is stored to uninstall the firmware:
./{product name}-npu-driver_x.x.x_linux-{arch}.run --uninstall
If a service or container occupies the davinci node, the system displays "The davinci nodes are occupied by some processes, please stop processes and install or uninstall again, details in: /var/log/ascend_seclog/ascend_install.log" during the uninstallation. You can use the --force parameter to forcibly uninstall the davinci node. For details, see Parameters and Commands. However, the running services may be affected.
If the following information is displayed, the driver is successfully uninstalled:Driver package uninstalled successfully!
- Run the following command in any directory:
- Determine whether to restart the server as prompted. If you need to restart the server, run the following command. Otherwise, skip this step.
reboot
After the driver is uninstalled, the npu-smi tool is unavailable.
Uninstalling a Driver (*.rpm)
This section describes how to uninstall the driver from the host.
Prerequisites
The uninstallation function cannot be used before the .rpm installation package is installed.
Procedure
- Use PuTTY to log in to the OS CLI of the server.
- Run the following command to switch to the root user:
su - root
- Run the following command to view the .rpm driver list:
rpm -qa | grep npu
If the command output contains the npu-driver field, the driver exists. The following is an example.
npu-driver-20.2.0-1.aarch64
- Run the following command to uninstall the driver:rpm -e npu-driver-20.2.0-1.aarch64If the following information is displayed, the driver is successfully uninstalled:
Driver package uninstalled successfully!
- Determine whether to restart the server as prompted. If you need to restart the server, run the following command. Otherwise, skip this step.
reboot
After the driver is uninstalled, the npu-smi tool is unavailable.
Uninstalling a Driver (*.deb)
With dpkg
- Run the following command to query the driver installation information:
dpkg -l | grep Ascend
- Run the following command to uninstall the software based on the query result in 1:
dpkg -r ascend310-driver
If the following information is displayed, the driver is successfully uninstalled:Driver package uninstalled successfully!
- The firmware depends on the driver. This command uninstalls the firmware first and then the driver.
- If a software package needs to be reinstalled when you uninstall the firmware and driver, the software package failed to be installed. In this case, you need to reinstall the software package to ensure that the installation is successful. If the software package fails to be installed, rectify the fault by referring to How Do I Handle a .deb Package Installation, Upgrade, or Uninstallation Failure?.
- Determine whether to restart the server as prompted. If you need to restart the server, run the following command. Otherwise, skip this step.
reboot
After the driver is uninstalled, the npu-smi tool is unavailable.
With apt-get
- Run the following command to query the driver installation information:
apt list ascend310*
- Run the following command to uninstall the software based on the query result in 1:
apt-get remove ascend310-driver
If the following information is displayed, the driver is successfully uninstalled:Driver package uninstalled successfully!
- The firmware depends on the driver. This command uninstalls the firmware first and then the driver.
- If a software package needs to be reinstalled when you uninstall the firmware and driver, the software package failed to be installed. In this case, you need to reinstall the software package to ensure that the installation is successful. If the software package fails to be installed, rectify the fault by referring to How Do I Handle a .deb Package Installation, Upgrade, or Uninstallation Failure?.
- Determine whether to restart the server as prompted. If you need to restart the server, run the following command. Otherwise, skip this step.
reboot
After the driver is uninstalled, the npu-smi tool is unavailable.