Uninstalling the CANN
When the Toolkit is uninstalled, ops (which was installed alongside the Toolkit) will be automatically uninstalled as well.
(Recommended) Script-based Uninstallation
If the CANN software is installed offline using a runfile, you can use an uninstallation script to uninstall the software.
- 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.
Uninstallation Using Parameters
If the CANN software is installed offline using a runfile, you can use the software package to uninstall the software.
./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 will not be read.
Path of the configuration file:
- root user: /etc/Ascend/ascend_cann_install.info
- Non-root users: ${HOME}/Ascend/ascend_cann_install.info
Uninstallation Using the Package Manager (Yum)
For online installation using Yum, you can use the following method to uninstall the software.
Uninstall ops first and then Toolkit if you need them removed.
- 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
Uninstallation Using the Package Manager (apt-get)
For online installation using apt-get, you can use the following method to uninstall the software.
Uninstall ops first and then Toolkit if you need them removed.
- 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
Uninstallation Using the Package Manager (Conda)
For online installation using Conda, you can use the following method to uninstall the software.
Uninstall ops first and then Toolkit if you need them removed.
conda remove ascend::xxx
Uninstallation Using the Package Manager (pip)
For online installation using pip, you must uninstall both the ops and Toolkit packages in the following way. (If only one software package is uninstalled, the folder where the remaining software package is located will also be deleted.)
pip uninstall xxx yyy