linux 下解除安裝 Python3
阿新 • • 發佈:2020-07-14
一、解除安裝Python3
1、解除安裝python3
rpm -qa|grep python3|xargs rpm -ev --allmatches --nodeps
2、 刪除所有殘餘檔案
whereis python3 |xargs rm -frv
3、檢視現有安裝的python
whereis python
[root@sh-idc-dba-test1 ~]# whereis python python: /usr/bin/python /usr/bin/python2.7 /usr/lib/python2.7 /usr/lib64/python2.7 /etc/python /usr/include/python2.7 /usr/local/python37/bin/python3.7 /usr/local/python37/bin/python3.7m /usr/local/python37/bin/python3.7m-config /usr/local/python37/bin/python3.7-config /usr/share/man/man1/python.1.gz [root@sh-idc-dba-test1 ~]# [root@sh-idc-dba-test1 ~]# [root@sh-idc-dba-test1 ~]# whereis python3 |xargs rm -frv removed ‘/usr/local/python37/bin/python3.7’ removed ‘/usr/local/python37/bin/python3.7m’ removed ‘/usr/local/python37/bin/python3’ removed ‘/usr/local/python37/bin/python3.7m-config’ removed ‘/usr/local/python37/bin/python3.7-config’ [root@sh-idc-dba-test1 ~]# [root@sh-idc-dba-test1 ~]# [root@sh-idc-dba-test1 ~]# whereis python python: /usr/bin/python /usr/bin/python2.7 /usr/lib/python2.7 /usr/lib64/python2.7 /etc/python /usr/include/python2.7 /usr/share/man/man1/python.1.gz [root@sh-idc-dba-test1 ~]#
然後使用find 命令找出 python的目錄全部刪除