---
title: 软件卸载
description: "用户不再使用KAE，或需要进行新版本KAE的安装时，请参考本节内容卸载KAE。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/252RC1/accel/kunpengaccel_06_0039.html
sourcePath: /source/zh/kunpengboostkithistory/252RC1/accel/kunpengaccel_06_0039.html
indexId: 8229917ecaf5172293b3a5d67691f66be4cf53f526a81a35028932e7adf81a5e72
---
# 软件卸载

用户不再使用KAE，或需要进行新版本KAE的安装时，请参考本节内容卸载KAE。

#### 卸载源码安装的KAE2.0

1. 使用SSH远程登录工具，以root账号进入Linux操作系统命令行界面。
2. 源码方式安装的加速器驱动包及KAE加速引擎库包通过脚本命令进行卸载。

  - 卸载驱动。
    1 2 cd KAE sh build.sh driver clean

  - 卸载UADK。
    1 sh build.sh uadk clean

  - 卸载KAE加速引擎。

    - OpenSSL 1.1.1x：
      1 sh build.sh engine clean

    - OpenSSL 3.0.x：
      1 sh build.sh engine3 clean

    - Tongsuo 8.4.0：
      1 sh build.sh engine3_tongsuo clean

  - 卸载KAEZlib。
    1 sh build.sh zlib clean

    若安装了KAEGzip解压缩工具，可通过下列命令卸载。

    1 sh build.sh gzip clean

  - 卸载KAEZstd。
    1 sh build.sh zstd clean

  - 卸载KAELz4。
    1 sh build.sh lz4 clean

也可以通过sh build.sh cleanup命令一键式卸载默认安装路径的KAE组件。


#### 卸载RPM安装的KAE2.0

1. 使用SSH远程登录工具，以root账号进入Linux操作系统命令行界面。
2. 卸载KAE加速引擎相关软件包并检查卸载情况。

  a. 使用rpm -e软件包名命令卸载kae-openssl、kae-driver和kae-zip。
    1 2 3 rpm -e kae-openssl rpm -e kae-driver rpm -e kae-zip

  b. 查询RPM包是否卸载成功。
    使用rpm -qa | grep 软件包名命令。 1 2 3 rpm -qa | grep kae-openssl rpm -qa | grep kae-driver rpm -qa | grep kae-zip

3. 查询KAE是否卸载成功。

  a. 查询KAE加速引擎软件库是否卸载，回显No such file or directory即卸载成功。
    1 ll /usr/local/lib/engines-1.1

  b. 查询KAEZip加速引擎软件库是否卸载，回显No such file or directory即卸载成功。
    1 ll /usr/local/kaezip/lib

  c. 查看KAE驱动是否已经卸载，没有回显内容即卸载成功。
    1 lsmod | grep uacce


#### 卸载源码安装的KAE1.0

1. 使用SSH远程登录工具，以root账号进入Linux操作系统命令行界面。
2. 源码方式安装的加速器驱动包及KAE加速引擎库包通过make uninstall命令进行卸载。

  a. 卸载驱动。
    1 2 cd kae_driver make uninstall

  b. 卸载warpdriver驱动开发库。
    1 2 cd warpdrive make uninstall

  c. 卸载KAE加速引擎。
    1 2 cd kae_engine make uninstall

  d. 卸载zlib加速库。
    1 2 cd kae_zip_engine sh setup.sh uninstall

3. 重启系统或通过命令行手动将已加载到内核的驱动卸载掉，并查看是否卸载成功。

  a. 查看已加载到内核的驱动。
    1 lsmod | grep uacce

    回显已加载到内核的驱动。 1 uacce 36864 3 hisi_sec2,hisi_qm,hisi_hpre,hisi_rde,hisi_zip

  b. 依次卸载驱动。
    1 2 3 4 5 6 rmmod hisi_hpre rmmod hisi_sec2 rmmod hisi_rde rmmod hisi_zip rmmod hisi_qm rmmod uacce

  c. 再次查询驱动是否删除。
    1 lsmod | grep uacce


#### 卸载RPM安装的KAE1.0

1. 使用SSH远程登录工具，以root账号进入Linux操作系统命令行界面。
2. 卸载KAE加速引擎软件包并检查卸载情况。

  a. 卸载KAE加速引擎软件包。
    使用rpm -e 软件包名命令，例如：卸载hisi_sec2。 1 rpm -e hisi_sec2

  b. 查询RPM包是否卸载成功。
    使用rpm -qa |grep 软件包名命令，例如：查询hisi_sec2是否卸载。 1 rpm -qa |grep hisi_sec2

    如下示例演示了卸载所有KAE加速引擎软件包的过程。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [root@localhost output]# rpm -e hisi_hpre hisi_hpre modules uninstalled [root@localhost output]# rpm -e hisi_sec2 hisi_sec2 modules uninstalled [root@localhost output]# rpm -e hisi_rde hisi_rde modules uninstalled [root@localhost output]# [root@localhost output]# rpm -e hisi_zip hisi_zip modules uninstalled [root@localhost output]# rpm -e uacce uacce modules uninstalling uacce modules uninstalled [root@localhost output]# rpm -e libwd libkae [root@localhost output]# [root@localhost output]# rpm -qa uacce hisi_hpre hisi_sec2 hisi_rde hisi_zip [root@localhost output]# rpm -qa libwd libkae

3. 重启系统或通过命令行手动将已加载到内核的驱动卸载掉，并查看是否卸载成功。

  a. 查看已加载到内核的驱动。
    1 lsmod | grep uacce

    回显已加载到内核的驱动。 1 uacce 36864 3 hisi_sec2,hisi_qm,hisi_hpre,hisi_rde,hisi_zip

  b. 卸载已加载的驱动。
    1 2 3 4 5 6 rmmod hisi_hpre rmmod hisi_sec2 rmmod hisi_rde rmmod hisi_zip rmmod hisi_qm rmmod uacce

  c. 查看是否已经卸载，没有回显内容即卸载成功。
    1 lsmod | grep uacce


#### 卸载DEB安装的KAE1.0

1. 使用SSH远程登录工具，以root账号进入Linux操作系统命令行界面。
2. 卸载KAE加速引擎软件包并检查卸载情况。

  a. 卸载KAE加速引擎软件包。
    使用dpkg -r 软件包名命令，例如卸载hisi_sec2。 1 dpkg -r hisi-sec2

  b. 运行命令查询软件包是否卸载成功。
    使用dpkg -L 软件包名命令，例如查询hisi_sec2是否卸载成功。

    1 dpkg -L hisi_sec2

如下示例演示了卸载所有KAE加速引擎软件包的过程。

```
[root@localhost output]# dpkg -r hisi-hpre
(Reading database ... 79192 files and directories currently installed.)
Removing hisi-hpre (1.3.2) ...
hisi_hpre modules uninstalling
hisi_hpre modules uninstalled
[root@localhost output]# dpkg -r hisi-sec2
(Reading database ... 79190 files and directories currently installed.)
Removing hisi-sec2 (1.3.2) ...
hisi_sec2 modules uninstalling
hisi_sec2 modules uninstalled
[root@localhost output]# dpkg -r hisi-rde
(Reading database ... 79186 files and directories currently installed.)
Removing hisi-rde (1.3.2) ...
hisi_rde modules uninstalling
hisi_rde modules uninstalled
[root@localhost output]# dpkg -r hisi-zip
(Reading database ... 79188 files and directories currently installed.)
Removing hisi-zip (1.3.2) ...
hisi_zip modules uninstalling
hisi_zip modules uninstalled
[root@localhost output]# dpkg -r uacce
(Reading database ... 79184 files and directories currently installed.)
Removing uacce (1.3.2) ...
uacce modules uninstalling
uacce modules uninstalled
[root@localhost output]# dpkg -r libwd libkae 
(Reading database ... 79181 files and directories currently installed.)
Removing libkae (1.3.2) ...
Removing libwd (1.3.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
[root@localhost output]# dpkg -r libwd  libkaezip
(Reading database ... 79181 files and directories currently installed.)
Removing libkaezip (1.3.2) ...
Removing libwd (1.3.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
[root@localhost output]# dpkg -L uacce hisi-hpre hisi-sec2 hisi-rde hisi-zip
Package 'uacce' does not contain any files (!)
Package 'hisi-hpre' does not contain any files (!)
Package 'hisi-sec2' does not contain any files (!)
Package 'hisi-zip' does not contain any files (!)
[root@localhost output]# dpkg -L libwd libkae libkaezip
/usr
/usr/local
/usr/local/include

/usr
/usr/local
/usr/local/lib
/usr/local/lib/engines-1.1

Package 'libkaezip' does not contain any files (!)
```


3. 重启系统或者通过命令行手动将已加载到内核的驱动卸载掉，并查看是否卸载成功。

  a. 查看已加载到内核的驱动。
    1 lsmod | grep uacce

    回显已加载到内核的驱动。

    1 uacce 36864 3 hisi_sec2,hisi_qm,hisi_hpre,hisi_rde,hisi_zip

  b. 卸载已加载的驱动。
    1 2 3 4 5 6 rmmod hisi_hpre rmmod hisi_sec2 rmmod hisi_rde rmmod hisi_zip rmmod hisi_qm rmmod uacce

  c. 查看是否已经卸载，没有回显内容即卸载成功。
    1 lsmod | grep uacce
