All Projects → csev → uninstall-python3

csev / uninstall-python3

Licence: other
A Simple Shell Script to Uninstall Python 3 versions from Mac OS/X

Programming Languages

shell
77523 projects

Uninstall Python3

A simple shell script to Un-install Python 3 versions from Mac OS/X.

Of course we all want Python 3 everywhere - but sometimes we want to remove the older version and install the latest version - or just do a re-install from scratch.

There is no need to check out this repositoy - just grab the uninstall-python3.sh file and download it somewhere.

The script is designed to function as a dry run so you can see all that it will do. To run a dry run, do

bash uninstall-python3.sh

Examine the output - make sure that it is moving only the expected files. When you are convinced this will do what you expect run

bash uninstall-python3.sh | sudo bash -v

To verify the files are gone, you can re-run

bash uninstall-python3.sh

It should produce no output.

And then you can happily re-install Python 3!

Sample Output(an easy approach)

Here is the output of a sample run with the dry run first and the actual run second. At the very end we re-run a dry run to make sure things are gone.

$ bash uninstall-python3.sh
rm '/usr/local/bin/2to3'
rm '/usr/local/bin/2to3-3.6'
rm '/usr/local/bin/easy_install-3.6'
rm '/usr/local/bin/idle3'
rm '/usr/local/bin/idle3.6'
rm '/usr/local/bin/pip3'
rm '/usr/local/bin/pip3.6'
rm '/usr/local/bin/pydoc3'
rm '/usr/local/bin/pydoc3.6'
rm '/usr/local/bin/python3'
rm '/usr/local/bin/python3-32'
rm '/usr/local/bin/python3-config'
rm '/usr/local/bin/python3.6'
rm '/usr/local/bin/python3.6-32'
rm '/usr/local/bin/python3.6-config'
rm '/usr/local/bin/python3.6m'
rm '/usr/local/bin/python3.6m-config'
rm '/usr/local/bin/pyvenv'
rm '/usr/local/bin/pyvenv-3.6'
rm -rf '/Library/Frameworks/Python.framework/Versions/3.6'
rm -rf '/Applications/Python 3.6'
$ bash uninstall-python3.sh | sudo bash -v
Password:
rm '/usr/local/bin/2to3'
rm '/usr/local/bin/2to3-3.6'
rm '/usr/local/bin/easy_install-3.6'
rm '/usr/local/bin/idle3'
rm '/usr/local/bin/idle3.6'
rm '/usr/local/bin/pip3'
rm '/usr/local/bin/pip3.6'
rm '/usr/local/bin/pydoc3'
rm '/usr/local/bin/pydoc3.6'
rm '/usr/local/bin/python3'
rm '/usr/local/bin/python3-32'
rm '/usr/local/bin/python3-config'
rm '/usr/local/bin/python3.6'
rm '/usr/local/bin/python3.6-32'
rm '/usr/local/bin/python3.6-config'
rm '/usr/local/bin/python3.6m'
rm '/usr/local/bin/python3.6m-config'
rm '/usr/local/bin/pyvenv'
rm '/usr/local/bin/pyvenv-3.6'
rm -rf '/Library/Frameworks/Python.framework/Versions/3.6'
rm -rf '/Applications/Python 3.6'
$ bash uninstall-python3.sh
$

Happy re-installing!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].