linux 下卸載 Python3


一、卸載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的目錄全部刪除

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM