How to completely remove a Python version on MacOS in 3 steps (Working 2021)

Deleting a Python version on your Mac can be a real headache. Many solutions on the Internet do not work, so in this story, I am going to share with you the steps that I have followed to completely eliminate the version of Python that I had installed on my Mac.

Note.- It is recommended that you have a certain fluency with the handling of the terminal.

In my case, I am removing Python 3.9. If you have another version, you will have to replace literal “3.9” of the commands with the corresponding version.

Step 1: Remove the Python framework

sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.9

Step 2: Remove the Python applications

sudo rm -rf "/Applications/Python 3.9"

Step 3: Remove the symlinks (symbolic links)

First, go to the root folder with the following command:


Then, check what symlinks are you going to remove:

ls -l /usr/local/bin | grep '/Library/Frameworks/Python.framework/Versions/3.9'

Finally, remove the symlinks with the following command:

ls -l /usr/local/bin | grep '/Library/Frameworks/Python.framework/Versions/3.9' | awk '{print $9}' | tr -d @ | xargs sudo rm

Note.- You have to execute the rm command with sudo, so you’ll be prompted for the password.

Job done

Congratulations, you have just removed the python version from your Mac. If you have any problem following this post or a command doesn’t work for you, leave your comment.

Thank you, and I hope I have helped you!

Restorative, entrepreneur, strategic, and futurist. Engineer with a technological background who love business, finance, and strategy.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store