Uninstalling the CANN
After installing the CANN software in xxx.run format, you can uninstall it in either of the following ways.
If Kernels is installed together with other CANN packages, it will be automatically uninstalled when other CANN software is uninstalled.
(Recommended) Method 1: Using a Script
You can use the uninstallation script to perform the uninstallation. The procedure is as follows:
- Run the following command to access the path where the uninstallation script is located:
- Toolkit:
1cd <path>/ascend-toolkit/<version>/<arch>-linux/script
- NNAE:
1cd <path>/nnae/<version>/script
- NNRT:
1cd <path>/nnrt/<version>/<arch>-linux/script
- Uninstall Kernels separately (using the Toolkit installation path as an example):
1cd <path>/ascend-toolkit/<version>/opp_kernel/script
- NNAL:
1cd <path>/nnal/atb/<version>/scripts
In the preceding commands, <path> indicates the installation path of the software package, <version> indicates the software package version, and {arch}-linux indicates the CPU architecture. Replace them as required.
- Toolkit:
- Run the ./uninstall.sh command to run the script.If the following information is displayed, the software is successfully uninstalled:
1[INFO] xxx uninstall success
xxx indicates the name of a software package to be uninstalled.
Method 2: Uninstalling a Software Package
You can perform the uninstallation by uninstalling the software package. The procedure is as follows:
- Log in to the installation environment as the installation user of the software package.
- Go to the directory where the software package is stored.
- Run the following commands to uninstall the software package:
1./xxx.run --uninstallIf the following information is displayed, the software is successfully uninstalled:1[INFO] xxx uninstall success
xxx indicates the name of a software package to be uninstalled.
In this mode, the CANN package is uninstalled based on the path specified by Install_Path in the configuration file.
Path of the configuration file:
- root user: /etc/Ascend/ascend_cann_install.info
- Non-root user: ${HOME}/Ascend/ascend_cann_install.info