Uninstalling CANN
If the CANN software is installed using a .run package (offline) or a package manager (online), perform the following steps to uninstall it.
If ops is installed together with Toolkit, ops will be automatically uninstalled when Toolkit is uninstalled.
Script-based Uninstallation (Recommended)
If the CANN software is installed using a .run package (offline), you can use an uninstallation script to uninstall the software by performing the following steps:
- Toolkit:
cd <path>/cann-<version>/<arch>-linux/script ./uninstall.sh
- Uninstalling the ops separately:
cd <path>/cann-<version>/<arch>-linux/script ./ops_uninstall.sh
- NNAL:
cd <path>/nnal ./nnal_uninstall.sh
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.
1 | [INFO] xxx uninstall success |
xxx indicates the name of a software package to be uninstalled.
Uninstalling the Software Package Using the Parameter
If the software is installed using a .run package (offline), you can use an uninstallation script to uninstall the software by performing the following steps:
./xxx.run --uninstall
1 | [INFO] xxx uninstall success |
xxx indicates the name of a software package to be uninstalled.
In this mode, the CANN software package is uninstalled based on the path specified by Install_Path in the configuration file. The Install_Path in the configuration file in the backup timestamp folder is not read.
Path of the configuration file:
- root user: /etc/Ascend/ascend_cann_install.info
- Non-root users: ${HOME}/Ascend/ascend_cann_install.info
Performing Uninstallation Using the Package Manager (Yum)
After the online installation using Yum, you can use the following method to uninstall the software.
If both the ops and Toolkit packages are uninstalled, uninstall ops first and then CANN software.
- If you install the package as a non-root user, run the following command:
sudo yum remove xxx
- If you install the package as the root user, run the following command:
yum remove xxx
Performing Uninstallation Using the Package Manager (apt-get)
After the online installation using apt-get, you can use the following method to uninstall the software.
If both the ops and Toolkit packages are uninstalled, uninstall ops first and then CANN software.
- If you install the package as a non-root user, run the following command:
sudo apt-get remove xxx
- If you install the package as the root user, run the following command:
apt-get remove xxx
Performing Uninstallation Using the Package Manager (Conda)
After the online installation using Conda, you can use the following method to uninstall the software.
If both the ops and Toolkit packages are uninstalled, uninstall ops first and then CANN software.
conda remove ascend::xxx
Uninstallation Using the Package Manager (pip)
After the online installation using pip, you must uninstall both the ops and Toolkit packages. You can use the following method to uninstall them:
pip uninstall xxx yyy