• 如何卸载rpm包


    首先通过  rpm -q <关键字> 可以查询到rpm包的名字

    然后 调用 rpm -e <包的名字> 删除特定rpm包

    如果遇到依赖,无法删除,使用 rpm -e --nodeps <包的名字> 不检查依赖,直接删除rpm包

    如果恰好有多个包叫同样的名字,使用 rpm -e --allmatches --nodeps <包的名字> 删除所有相同名字的包, 并忽略依赖

    删除 mysql5.6示例

    [wuliang@localhost Downloads]$ rpm -qa|grep mysql
    mysql-community-client-5.6.27-2.el6.x86_64
    mysql-community-libs-5.6.27-2.el6.x86_64
    php-mysql-5.3.3-46.el6_6.x86_64
    mysql-community-common-5.6.27-2.el6.x86_64
    mysql-community-libs-compat-5.6.27-2.el6.x86_64
    mysql-community-server-5.6.27-2.el6.x86_64
    mysql-community-release-el6-5.noarch
    [wuliang@localhost Downloads]$ yum -y remove mysql
    
    [root@localhost Downloads]# rpm -qa|grep mysql
    mysql-community-libs-5.6.27-2.el6.x86_64
    php-mysql-5.3.3-46.el6_6.x86_64
    mysql-community-common-5.6.27-2.el6.x86_64
    mysql-community-libs-compat-5.6.27-2.el6.x86_64
    mysql-community-release-el6-5.noarch
    
    [root@localhost Downloads]# rpm -e mysql-community-libs-5.6.27-2.el6.x86_64
    error: Failed dependencies:
        mysql-community-libs(x86-64) = 5.6.27-2.el6 is needed by (installed) mysql-community-libs-compat-5.6.27-2.el6.x86_64
    [root@localhost Downloads]# rpm -e mysql-community-libs-compat-5.6.27-2.el6.x86_64
    error: Failed dependencies:
        libmysqlclient.so.16()(64bit) is needed by (installed) php-mysql-5.3.3-46.el6_6.x86_64
        libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) php-mysql-5.3.3-46.el6_6.x86_64
    [root@localhost Downloads]# rpm -e php-mysql-5.3.3-46.el6_6.x86_64
    [root@localhost Downloads]# rpm -e mysql-community-libs-compat-5.6.27-2.el6.x86_64
    [root@localhost Downloads]# rpm -e mysql-community-libs-5.6.27-2.el6.x86_64
    [root@localhost Downloads]# rpm -q|grep mysql
    rpm: no arguments given for query
    [root@localhost Downloads]# rpm -qa|grep mysql
    mysql-community-common-5.6.27-2.el6.x86_64
    mysql-community-release-el6-5.noarch
    [root@localhost Downloads]# rpm -e mysql-community-release-el6-5.noarch
    [root@localhost Downloads]# rpm -e mysql-community-common-5.6.27-2.el6.x86_64
    [root@localhost Downloads]# rpm -qa|grep mysql
    没有了  说明删除干净
  • 相关阅读:
    笨方法学python中执行argv提示ValueError: not enough values to unpack (expected 4, got 1)
    VMware workstation安装
    Redis bigkey分析
    MySQL drop table 影响及过程
    MySQL 大表硬连接删除
    ES elasticsearch 各种查询
    ES elasticsearch 各种聚合
    ES elasticsearch 聚合统计
    ES elasticsearch 实现 count单字段,分组取前多少位,以地理位置中心进行统计
    MySQL行溢出、varchar最多能存多少字符
  • 原文地址:https://www.cnblogs.com/wuling129/p/5265066.html
Copyright © 2020-2023  润新知