Uninstall Python Package from OS X


I have been using Python 3 on my OS X provided by the installation package from Python.org for some time, and recently I have decided to switch to Python installation from Homebrew for easier management.

In order to uninstall the Python from package, you must remove the files and symbolic links to them.

WARNING: This commands will remove all Python versions installed with packages. Python provided from the system will not be affected.

sudo rm -rf /Library/Frameworks/Python.framework
cd /usr/local/bin
ls -l . | grep '../Library/Frameworks/Python.framework' | awk '{print $9}' | xargs sudo rm

You should also remember to remove the application folder, where x.y is the version number of your installation (ie. 2.7 or 3.4).

sudo rm -rf "/Applications/Python x.y"
,