Uninstalling the CANN
When uninstalling the CANN container image pulled from AscendHub, remove the built container image based on service requirements. If the CANN software is installed in the container in other modes, select the corresponding installation mode in Selecting an Installation Scenario and view the uninstallation procedure.
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.
- Uninstalling the 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.
If both the ops and Toolkit packages need to be uninstalled, follow the ops > CANN software uninstallation sequence.
- 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.
If both the ops and Toolkit packages need to be uninstalled, follow the ops > CANN software uninstallation sequence.
- 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.
If both the ops and Toolkit packages need to be uninstalled, follow the ops > CANN software uninstallation sequence.
conda remove ascend::xxx
Uninstallation Using the Package Manager (pip)
For online installation using pip, you must uninstall both the ops and Toolkit packages as follows.
pip uninstall xxx yyy