centos5.4 的rpm命令精解
1,現實情況往往是你想刪除或解除安裝已安裝好的軟體。但你可能只知道這個軟體安裝好後的檔名是什麼,此時可以先用which或其find找到你想刪除的檔案
[root@localhost rpm]# which httpd ---查刪除的檔案
/usr/sbin/httpd
[root@localhost rpm]# rpm -q -f /usr/sbin/httpd --根據檔案查出所對應的rpm包名
httpd-2.2.3-31.el5.centos
[root@localhost rpm]# rpm -e httpd-2.2.3-31.el5.centos --執行刪除
error: Failed dependencies: --會報錯,這說明會有依賴關係存在
httpd-mmn = 20051115 is needed by (installed) php-5.1.6-23.2.el5_3.i386
httpd-mmn = 20051115 is needed by (installed) mod_python-3.2.8-3.1.i386
httpd-mmn = 20051115 is needed by (installed) mod_ssl-2.2.3-31.el5.centos.i386
httpd-mmn = 20051115 is needed by (installed) mod_perl-2.0.4-6.el5.i386
webserver is needed by (installed) webalizer-2.01_10-30.1.i386
httpd is needed by (installed) piranha-0.8.4-13.el5.i386
httpd >= 2.0.40 is needed by (installed) mod_python-3.2.8-3.1.i386
httpd = 0:2.2.3-31.el5.centos is needed by (installed) mod_ssl-2.2.3-31.el5.centos.i386
httpd = 2.2.3-31.el5.centos is needed by (installed) httpd-manual-2.2.3-31.el5.centos.i386
httpd >= 2.2.0 is needed by (installed) gnome-user-share-0.10-6.el5.i386
httpd is needed by (installed) system-config-httpd-1.3.3.3-1.el5.noarch
[root@localhost rpm]# rpm -e --allmatches httpd-2.2.3-31.el5.centos
error: Failed dependencies:
httpd-mmn = 20051115 is needed by (installed) php-5.1.6-23.2.el5_3.i386
httpd-mmn = 20051115 is needed by (installed) mod_python-3.2.8-3.1.i386
httpd-mmn = 20051115 is needed by (installed) mod_ssl-2.2.3-31.el5.centos.i386
httpd-mmn = 20051115 is needed by (installed) mod_perl-2.0.4-6.el5.i386
webserver is needed by (installed) webalizer-2.01_10-30.1.i386
httpd is needed by (installed) piranha-0.8.4-13.el5.i386
httpd >= 2.0.40 is needed by (installed) mod_python-3.2.8-3.1.i386
httpd = 0:2.2.3-31.el5.centos is needed by (installed) mod_ssl-2.2.3-31.el5.centos.i386
httpd = 2.2.3-31.el5.centos is needed by (installed) httpd-manual-2.2.3-31.el5.centos.i386
httpd >= 2.2.0 is needed by (installed) gnome-user-share-0.10-6.el5.i386
httpd is needed by (installed) system-config-httpd-1.3.3.3-1.el5.noarch
-----加上刪除一些選項,--allmatches是把與這個rpm包所有相匹配的rpm包全部刪除掉;--nodeps是在刪除時不進行依賴性的讀取
[root@localhost rpm]# rpm -e --allmatches --nodeps httpd-2.2.3-31.el5.centos
[root@localhost rpm]# which httpd ---再次查詢,已經安裝的rpm包已經沒有了
[root@localhost rpm]# which httpd ---查刪除的檔案
/usr/sbin/httpd
[root@localhost rpm]# rpm -q -f /usr/sbin/httpd --根據檔案查出所對應的rpm包名
httpd-2.2.3-31.el5.centos
[root@localhost rpm]# rpm -e httpd-2.2.3-31.el5.centos --執行刪除
error: Failed dependencies: --會報錯,這說明會有依賴關係存在
httpd-mmn = 20051115 is needed by (installed) php-5.1.6-23.2.el5_3.i386
httpd-mmn = 20051115 is needed by (installed) mod_python-3.2.8-3.1.i386
httpd-mmn = 20051115 is needed by (installed) mod_ssl-2.2.3-31.el5.centos.i386
httpd-mmn = 20051115 is needed by (installed) mod_perl-2.0.4-6.el5.i386
webserver is needed by (installed) webalizer-2.01_10-30.1.i386
httpd is needed by (installed) piranha-0.8.4-13.el5.i386
httpd >= 2.0.40 is needed by (installed) mod_python-3.2.8-3.1.i386
httpd = 0:2.2.3-31.el5.centos is needed by (installed) mod_ssl-2.2.3-31.el5.centos.i386
httpd = 2.2.3-31.el5.centos is needed by (installed) httpd-manual-2.2.3-31.el5.centos.i386
httpd >= 2.2.0 is needed by (installed) gnome-user-share-0.10-6.el5.i386
httpd is needed by (installed) system-config-httpd-1.3.3.3-1.el5.noarch
[root@localhost rpm]# rpm -e --allmatches httpd-2.2.3-31.el5.centos
error: Failed dependencies:
httpd-mmn = 20051115 is needed by (installed) php-5.1.6-23.2.el5_3.i386
httpd-mmn = 20051115 is needed by (installed) mod_python-3.2.8-3.1.i386
httpd-mmn = 20051115 is needed by (installed) mod_ssl-2.2.3-31.el5.centos.i386
httpd-mmn = 20051115 is needed by (installed) mod_perl-2.0.4-6.el5.i386
webserver is needed by (installed) webalizer-2.01_10-30.1.i386
httpd is needed by (installed) piranha-0.8.4-13.el5.i386
httpd >= 2.0.40 is needed by (installed) mod_python-3.2.8-3.1.i386
httpd = 0:2.2.3-31.el5.centos is needed by (installed) mod_ssl-2.2.3-31.el5.centos.i386
httpd = 2.2.3-31.el5.centos is needed by (installed) httpd-manual-2.2.3-31.el5.centos.i386
httpd >= 2.2.0 is needed by (installed) gnome-user-share-0.10-6.el5.i386
httpd is needed by (installed) system-config-httpd-1.3.3.3-1.el5.noarch
-----加上刪除一些選項,--allmatches是把與這個rpm包所有相匹配的rpm包全部刪除掉;--nodeps是在刪除時不進行依賴性的讀取
[root@localhost rpm]# rpm -e --allmatches --nodeps httpd-2.2.3-31.el5.centos
[root@localhost rpm]# which httpd ---再次查詢,已經安裝的rpm包已經沒有了
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-661604/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rpm命令講解
- rpm 命令詳解
- 使用centos5.4的rpm安裝tomcat隨感CentOSTomcat
- rpm命令詳解(轉)
- rpm命令的使用介紹
- Linux命令 rpmLinux
- Linux rpm命令Linux
- RPM基本命令
- Linux 中 RPM 命令引數使用詳解Linux
- 簡單使用rpm命令
- rpm 常用命令
- RPM命令手冊 (轉)
- Linux命令之rpm安裝命令Linux
- 使用RPM包管理命令的筆記筆記
- 查詢命令對應的RPM包
- Linux rpm查詢命令以及RPM包驗證Linux
- rpm常用命令及rpm引數介紹
- rpm 常用命令(轉)
- rpm五種操作的常用命令
- 關於 RPM 命令的權威說明
- RPM常用命令介紹
- LINUX下RPM命令基本用法Linux
- 一些比較生僻的 RPM 命令(轉)
- Linux RPM包安裝、解除安裝、升級命令講解Linux
- Linux 中 RPM 命令引數使用詳解 [其它Linux/unix]Linux
- RMAN命令小結(精簡命令)
- CentOS中rpm命令詳細介紹CentOS
- rpm與yum,at與crontab,sed命令使用
- CentOS5.4上安裝RACCentOS
- 最常用的網路命令精萃
- Linux 筆記分享十三:RPM 命令管理Linux筆記
- 九、Linux/UNIX操作命令積累【rpm】Linux
- Linux下RPM 命令用法中文簡介Linux
- Linux下查詢命令對應的RPM安裝包Linux
- RPM中幾個生闢但有用的命令引數(轉)
- rpm命令沒有反應是怎麼回事?
- Helm命令在精不在多
- Linux精講——find命令Linux