Skip to content

Commit 0d17706

Browse files
authored
Create uninstall-python3.sh
1 parent c9cb3f4 commit 0d17706

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

uninstall-python3.sh

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This script will uninstall all the versions of Python 3.x
2+
# on your Mac OS/X system - It is designed to function as a dry run
3+
# so you can see all that it will do. To run a dry run, do
4+
#
5+
# bash uninstall-python3.sh
6+
#
7+
# Examine the output - make sure that it is moving only the expected
8+
# files. When you are convinced this will do what you expect run
9+
#
10+
# bash uninstall-python3.sh | sudo bash -v
11+
#
12+
# To verify the files are gone, you can re-run
13+
#
14+
# bash uninstall-python3.sh
15+
#
16+
# It should produce no output.
17+
#
18+
# And then you can happily re-install Python 3
19+
#
20+
# Written by: Charles R. Severance (@drchuck)
21+
# https://github.com/csev/uninstall-python3
22+
# License: Public Domain / MIT - Use any way you like
23+
24+
ls -l /usr/local/bin | grep /Library/Frameworks/Python.framework/Versions/3 | awk '{print "rm \47/usr/local/bin/" $9 "\47"}'
25+
ls -d /Library/Frameworks/Python.framework/Versions/3.* 2> /dev/null | awk '{print "rm -rf \47" $0 "\47"}'
26+
ls -d /Applications/Python\ 3.* 2> /dev/null | awk '{print "rm -rf \47" $0 "\47"}'

0 commit comments

Comments
 (0)