sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7 sudo rm -rf "/Applications/Python 2.7" cd /usr/local/bin/ ls -l /usr/local/bin/ | grep ‘../Library/Frameworks/Python.framework/Versions/2.7‘ | awk ‘{print $9}‘ | xargs sudo rm sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.6 sudo rm -rf "/Applications/Python 3.6" cd /usr/local/bin/ ls -l /usr/local/bin/ | grep ‘../Library/Frameworks/Python.framework/Versions/3.6‘ | awk ‘{print $9}‘ | xargs sudo rm