zoukankan      html  css  js  c++  java
  • 如何卸载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
    没有了  说明删除干净
  • 相关阅读:
    kerberos
    BZOJ 3309 莫比乌斯反演
    Pollard_rho定理 大数的因数个数 这个板子超级快
    POJ 3171 区间覆盖最小值&&线段树优化dp
    拼题 L2-001 紧急救援 最短路计数+记录路径
    HDU 6464 权值线段树 && HDU 6468 思维题
    HDU 1394 线段树求逆序对
    [Poi2010]Bridges 最大流+二分答案 判定混合图欧拉回路
    01背包 多重背包 复习 模板
    CF 2018 Battle of Brains GYM 102062 F
  • 原文地址:https://www.cnblogs.com/wuling129/p/5265066.html
Copyright © 2011-2022 走看看