๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ uninstalling on mac
r/learnpython on Reddit: Uninstalling on Mac
March 14, 2024 -

Edit/Resolved: Xcode installs python3 into usr/bin. Link: https://discuss.python.org/t/updating-python-under-usr-bin-python3/13020/6

tldr; Can someone walk me through how to delete python exec files contained in /usr/bin on Mac and explain why these would exist in the first place? TIA

I'm on Mac Sonoma (17.4) and trying to cleanup my files, dependencies, etc. I'm pretty new to programming in general and anyway I made big a mess with having a bunch of versions of python installed. Had a version in homebrew, bunch of python files in anaconda, and python installed "normally" in my applications.

So, I deleted all of them to start fresh. However, when I "pip3 list" and "where python3". There is still python a version in /usr/bin and I'm unsure why or how to delete it. They are two exec files, one for pip and one for python3.

๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ how to uninstall old version of python from mac
r/learnpython on Reddit: how to uninstall old version of python from mac
August 13, 2023 -

I currently have 3.10x and 3.11.x and I want to know how can I uninstall the older version of python I have ?

also for future how do I upgrade from 3.11.2 to say 3.11.4 or 3.12.x

๐ŸŒ
Reddit
reddit.com โ€บ r/macos โ€บ can't seem to uninstall python3 via terminal? no idea what i'm doing, apparently
r/MacOS on Reddit: Can't seem to uninstall Python3 via Terminal? No idea what I'm doing, apparently
April 11, 2023 -

I installed Python3 on my Mac because I wanted to use a plugin that required it, then realized it's WAY over my head and skill level, so I followed the instructions to uninstall it manually by dragging it to trash, then using Terminal to get rid of the leftover bits by putting in "sudo rm -rf /Library/Frameworks/Python.framework". I then typed "Python3" in the terminal to make sure it was deleted - except, it's still there, so the command line didn't do anything. What do I do now? Thanks!

๐ŸŒ
Reddit
reddit.com โ€บ r/macos โ€บ removing python question
Removing Python question : r/MacOS
October 4, 2024 - First you use brew list | grep python to find out what exactly python version you've installed. Then you install one by one using brew uninstall xxxx to uninstall the package.
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ trying to remove python through mac terminal
r/learnpython on Reddit: Trying to remove python through Mac Terminal
December 16, 2021 -

I am a complete noobie and I am trying to remove the Python folder in the Mac Terminal. The reason I am trying to do this is because I installed homebrew to get access to Git or the git-gui. However, when I type $brew doctor, I get the following message

"Having additional scripts in your path can confuse software installed via

Homebrew if the config script overrides a system or Homebrew-provided

script of the same name. We found the following "config" scripts:

/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7-config

/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7m-config

/Library/Frameworks/Python.framework/Versions/3.7/bin/python3-config"

After locating, the Pyhon folder in the Library directory. I tried $ rm -R to delete the Python directory and the following message was returned

"override rw-r--r-- root/wheel for Python//2.7/site-packages/vboxapi/__init__.pyc? "

I have no idea how to procede

The whole pupose of this is to install a git gui. If you know of a better way, let me know

And yes, I have tried deleting the application through the mac gui, but the folder is still present.

Find elsewhere
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ how to uninstall python mac? i have python 2.7 that was originally installed on my mac and i updated it to 3.6 (the newest version) but the book i'm reading to learn python uses python 2.7 so i just wanted to know how do i just remove the python 3.6 i updated it to so i can just use python 2.7?
r/Python on Reddit: How to uninstall python mac? I have python 2.7 that was originally installed on my mac and I updated it to 3.6 (the newest version) but the book I'm reading to learn python uses python 2.7 so I just wanted to know how do I just remove the python 3.6 I updated it to so I can just use python 2.7?
March 17, 2018 - So, you donโ€™t really need to uninstall anything. At least, Python 2.7 and Python 3.something work nicely together. ... Thank you for the explanation! I just wanted details on why and you provided them :). Okay so I have this other beginner book that teaches in any 3.0 python version. So if I downloaded python 3.6 and python 2.7 was factory installed on my mac that means I need to use the virtual environment to use the python 3.6?
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ complete reinstall of pythong on macos
r/learnpython on Reddit: Complete reinstall of Pythong on MacOS
September 17, 2023 -

As a student, I had to install python and work with it. At some point my TA "fixed" an issue where now when I attempt to use PIP installations, I'm getting errors. I'm getting:
bash: pip: command not found
and

/opt/homebrew/opt/python@3.11/bin/python3.11: bad interpreter: No such file or directory

When attempting to google up advice, I'm seeing a reinstall is needed. So how do I uninstall everything completely so I can do a good reinstall?

๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ how to fully uninstall python, anaconda and vs code from mac m1?
r/learnpython on Reddit: How to fully uninstall Python, Anaconda and VS Code from Mac M1?
February 3, 2022 -

I'd like to do a fresh install of Python on my system. That said, I understand Python keeps user files under root folders and so on. I'm not familiar with Mac, so this makes things a little more complicated.

Any tips on completely uninstalling things so I can then (successfully) reinstall Python and VS Code from scratch?

Top answer
1 of 5
105

WARNING: macOS comes with a system Python installation in /usr/bin/python3 that should NOT be removed as it's required for system functionality. Only remove Python versions you've manually installed.

Please read the end of 5.1.1 for official insight: https://docs.python.org/3/using/mac.html#installation-steps

Legacy Python

The previous edit for this question suggested removing /Library/Frameworks/Python.framework/Versions/2.x/bin/python as a way of completely removing Python. This flexibility has since changed with newer macOS updates.

Identify Your Python Installations

Before removing anything, determine which Python installations exist and where they're located:

# List all Python installations
which -a python python3

# Check Python versions
python3 --version

# Find installation locations
ls -l /opt/homebrew/bin/python*
ls -l /usr/local/bin/python*
ls -l /usr/bin/python*

For Homebrew Python

# Uninstall Python
brew uninstall [email protected]
# Remove orphaned files
brew cleanup
# List any broken symlinks, etc.
brew doctor

For Python.org installer

# Remove the application
sudo rm -rf /Applications/Python\ 3.x

# Check for framework files
ls -la /Library/Frameworks/Python.framework/Versions/
# If found, remove the specific version
sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.x

# Check for and remove symbolic links
# For Intel Macs:
cd /usr/local/bin
ls -l | grep '../Library/Frameworks/Python.framework/Versions/3.x' | awk '{print $9}' | xargs rm -f
# For Apple Silicon:
cd /usr/local/bin
ls -l | grep '../Library/Frameworks/Python.framework/Versions/3.x' | awk '{print $9}' | xargs rm -f

# Check for user-specific packages
ls -l ~/Library/Python/
# Remove if needed
rm -rf ~/Library/Python/3.x/

For pyenv-managed Python

# List all installed Python versions
pyenv versions

# Show the current active version
pyenv version

# Uninstall a specific version
pyenv uninstall 3.x.y

# Check pyenv installation location
ls -la ~/.pyenv/versions/

# Remove pyenv shims and rehash
pyenv rehash

# If you want to completely remove pyenv itself
# For Homebrew installation:
brew uninstall pyenv
# For manual installation:
rm -rf ~/.pyenv
# Don't forget to remove pyenv initialization from your shell profile
# (.bash_profile, .zshrc, etc.)

Clean Up Remaining Files

# Remove Python cache files
find ~/ -name "__pycache__" -type d -exec rm -rf {} +
find ~/ -name "*.pyc" -delete

# Check for any remaining Python-related directories
ls -la ~/Library/Application\ Support/ | grep -i python
ls -la ~/Library/Caches/ | grep -i python
2 of 5
58
# The version of Python that you want to delete
python_version_number=3.10
sudo rm -rf /Library/Frameworks/Python.framework/Versions/${python_version_number}/
sudo rm -rf "/Applications/Python ${python_version_number}/"
cd /usr/local/bin && ls -l | grep "/Library/Frameworks/Python.framework/Versions/${python_version_number}" | awk '{print $9}' | sudo xargs rm
๐ŸŒ
Nektony
nektony.com โ€บ home โ€บ how to โ€บ how to uninstall python from mac: a complete guide
How to uninstall Python on Mac (3 proven methods)
October 10, 2025 - Reinstallation or upgrade. Developers uninstall older versions when switching from, say, Python 3.11 to 3.13, to avoid clutter. Resolving version conflicts. If you have multiple Python versions installed, they can conflict with each other or cause confusion (as in this case of a Reddit user).
๐ŸŒ
Reddit
reddit.com โ€บ r โ€บ learnprogramming โ€บ comments โ€บ 46i7sv โ€บ how_do_you_uninstall_python_3_on_osx_so_i_can
r/learnprogramming - How do you uninstall Python 3 on OSX so I can install Anaconda?
April 5, 2020 - This feels like a stupid question, but I've just switched from windows I'm still getting the hang of installing and uninstalling programs on a Mac. I know my macbook came with 2.7 and then I installed 3.5 through the installer. I also pip installed a bunch of files globally and on my user.
๐ŸŒ
Super User
superuser.com โ€บ questions โ€บ 1761253 โ€บ how-to-delete-python-on-mac-completely
macos - How to delete Python on mac completely? - Super User
January 5, 2023 - You will also find in this article more information about using the App Cleaner & Uninstaller. ... I came across this GitHub Gist with a few simple commands that remove the "Python Releases for macOS"/"Python Launcher.app" Python versions while not touching the macOS default version in /usr/bin/python3.
Top answer
1 of 16
959

Do not attempt to remove any Apple-supplied system Python which are in /System/Library and /usr/bin, as this may break your whole operating system.


NOTE: The steps listed below do not affect the Apple-supplied Python 2.7; they only remove a third-party Python framework, like those installed by python.org installers.


The complete list is documented here. Basically, all you need to do is the following:

  1. Remove the third-party Python 2.7 framework

     sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
    
  2. Remove the Python 2.7 applications directory

     sudo rm -rf "/Applications/Python 2.7"
    
  3. Remove the symbolic links, in /usr/local/bin, that point to this Python version. See them using

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

and then run the following command to remove all the links:

    cd /usr/local/bin/
    ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | tr -d @ | xargs rm
  1. If necessary, edit your shell profile file(s) to remove adding /Library/Frameworks/Python.framework/Versions/2.7 to your PATH environment file. Depending on which shell you use, any of the following files may have been modified: ~/.bash_login, ~/.bash_profile, ~/.cshrc, ~/.profile, ~/.tcshrc, ~/.zshrc, and/or ~/.zprofile.
2 of 16
80

This one works:

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

Description: It list all the links, removes @ character and then removes them.

๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ help! too many versions of python. how do i uninstall with out removing osx's built in python?
r/learnpython on Reddit: Help! Too many versions of Python. How do I uninstall with out removing OSX's built in python?
August 3, 2016 -

I'm a novice python user

I wanted to use Matplotlib. Could not import it into python. Figured it wasn't installed.

-Tried installing it.

-openend python tried importing agian. Python can't find it or it doesn't exist.

-Tried seeing what versions of python are already installed

I think I'm having a similar problem to what was posted here. I had similar bad habits.

I think the simplest solution would be to uninstall all python versions except the built in one. But I don't really know how to do that? Advice?