So, I ended up removing all python installations, and reinstalling things via Homebrew.

  1. which python ---> /Library/Frameworks/Python.framework/Versions/2.7/bin/python Delete the entire Python.framework directory from /Library/Frameworks.
  2. which python3 ---> /usr/local/bin/python3 Delete the entire python3 directory.
  3. I was a bit nervous about the symlinks. I initially renamed the ones that were obviously going to cause me trouble. It turns out that was unnecessary. Instead, just use:

    $ brew doctor
    Warning: Broken symlinks were found. Remove them with 'brew prune':
      /usr/local/bin/python-32
      /usr/local/bin/python2-32
      /usr/local/bin/python2.7-32
      /usr/local/bin/python2_DNU
      /usr/local/bin/python_DNU
      /usr/local/bin/pythonw-32
      /usr/local/bin/pythonw2-32
      /usr/local/bin/pythonw2.7-32
    

    So, brew prune (or brew cleanup --prune in newer versions of Homebrew) worked perfectly. It removed all of the above symlinks.

  4. Reinstall python and python3 via homebrew. All done.

At no time did I touch the python installation located within the /System folder.

Oh, and to be clear. The answer to the original question is

Yes, you can trust the old references, as written! That guidance is still valid.

Answer from zipzit on Stack Exchange
Top answer
1 of 3
64

So, I ended up removing all python installations, and reinstalling things via Homebrew.

  1. which python ---> /Library/Frameworks/Python.framework/Versions/2.7/bin/python Delete the entire Python.framework directory from /Library/Frameworks.
  2. which python3 ---> /usr/local/bin/python3 Delete the entire python3 directory.
  3. I was a bit nervous about the symlinks. I initially renamed the ones that were obviously going to cause me trouble. It turns out that was unnecessary. Instead, just use:

    $ brew doctor
    Warning: Broken symlinks were found. Remove them with 'brew prune':
      /usr/local/bin/python-32
      /usr/local/bin/python2-32
      /usr/local/bin/python2.7-32
      /usr/local/bin/python2_DNU
      /usr/local/bin/python_DNU
      /usr/local/bin/pythonw-32
      /usr/local/bin/pythonw2-32
      /usr/local/bin/pythonw2.7-32
    

    So, brew prune (or brew cleanup --prune in newer versions of Homebrew) worked perfectly. It removed all of the above symlinks.

  4. Reinstall python and python3 via homebrew. All done.

At no time did I touch the python installation located within the /System folder.

Oh, and to be clear. The answer to the original question is

Yes, you can trust the old references, as written! That guidance is still valid.

2 of 3
32

My Python version was 3.6, I wanted to upgrade to 3.7 (In case you have similar requirements). I am using macOS version 10.12.6 and simply uninstalling and re-installing worked for me:

brew uninstall --ignore-dependencies python3

Then:

brew install python3

and done:

python3
Python 3.7.2 (default, Jan 13 2019, 12:51:54) 
[Clang 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Discussions

How to completely uninstall Python 3 on macOS? - Stack Overflow
This flexibility has since changed with newer macOS updates. 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* # Uninstall Python brew ... More on stackoverflow.com
🌐 stackoverflow.com
How to fully uninstall Python 3 on macOS Catalina? - Ask a Question - TestMu AI Community
I used the command brew uninstall python3 on macOS Catalina 10.15.3, but it still shows up when I check the version and path: which python3 /usr/bin/python3 python3 -V Python 3.7.3 Despite uninstalling it with brew uninstall Python, the version remains, and the python3 command still points ... More on community.testmuai.com
🌐 community.testmuai.com
0
December 19, 2024
macbook pro - Cannot uninstall Python from homebrew - Ask Different
0 How to Uninstall Python 3.6 safely and let 3.9 remain installed on my Mac big Sur especially the carshes · 48 How to make python 3.11 my default python3 with brew More on apple.stackexchange.com
🌐 apple.stackexchange.com
Uninstall Python-3.10 clearly on Mac
I downloaded and installed python 3.10. But now I wanted to uninstall this and install python 3.9 by brew. How do I uninstall python 3.10 clearly. It would be nice if the downloaded software has a uninstall application or something to remove only the python 3.10 that I downloaded. More on discuss.python.org
🌐 discuss.python.org
0
1
November 10, 2021
People also ask

Is Python installed on Mac by default?
On macOS 12 Monterey and earlier, Python 2.7 comes preinstalled. On macOS 13 Ventura and newer, Python is not preinstalled, but it can appear if you install Command Line Tools for Xcode or apps that bundle Python.
🌐
nektony.com
nektony.com › home › how to › how to uninstall python from mac: a complete guide
How to uninstall Python on Mac (3 proven methods)
Where is Python on macOS?
System Python is in one of the following locations: /usr/bin/python or /usr/bin/python2.7 (do not delete them). User-installed Python is usually in /usr/local/bin/python3.
🌐
nektony.com
nektony.com › home › how to › how to uninstall python from mac: a complete guide
How to uninstall Python on Mac (3 proven methods)
How to check if Python is installed on Mac?
Open Terminal and type: python3 --version If Python is installed, you’ll see the version number. You can also type python2 --version on older macOS releases. See how to check how Python was installed.
🌐
nektony.com
nektony.com › home › how to › how to uninstall python from mac: a complete guide
How to uninstall Python on Mac (3 proven methods)
🌐
DEV Community
dev.to › therealdarkmage › clean-up-and-remove-a-python3-homebrew-install-21ai
Clean up and remove a Python3 homebrew install - DEV Community
March 19, 2019 - pip3 freeze > requirements.txt pip3 freeze | xargs pip3 uninstall -y rm -rfv /usr/local/bin/python3* # Reinstall python3 here! pip3 install -r requirements.txt ... I'm new to the mac, and apparently I've made some sort of error.
🌐
MacKeeper
mackeeper.com › blog › mac tutorials › uninstall python on mac
Uninstall Python on Mac: How to Remove Library With Files from macOS?
April 23, 2025 - Another easy method you can try is to uninstall Python on Mac with Homebrew: Open Terminal and type brew list.
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
Find elsewhere
🌐
TestMu AI Community
community.testmuai.com › ask a question
How to fully uninstall Python 3 on macOS Catalina? - Ask a Question - TestMu AI Community
December 19, 2024 - I used the command brew uninstall python3 on macOS Catalina 10.15.3, but it still shows up when I check the version and path: which python3 /usr/bin/python3 python3 -V Python 3.7.3 Despite uninstalling it with brew uninstall Python, the version ...
🌐
YouTube
youtube.com › watch
How To Uninstall Python On MacOS Using Homebrew | Mac ...
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
🌐
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 - If you installed Python with Homebrew (macOS package manager), you can remove it safely using a few Terminal commands. Step 1. Open Terminal · Go to Applications → Utilities → Terminal. Step 2. Check installed packages · Run: brew list ·
🌐
Delft Stack
delftstack.com › home › howto › python › uninstall python on mac os
How to Uninstall Python on macOS | Delft Stack
March 11, 2025 - Is it safe to uninstall the system version of Python? It is not recommended to uninstall the system version as it is used for various system tasks. How can I reinstall Python after uninstalling it?
🌐
Python.org
discuss.python.org › python help
Uninstall Python-3.10 clearly on Mac - Python Help - Discussions on Python.org
November 10, 2021 - I downloaded and installed python 3.10. But now I wanted to uninstall this and install python 3.9 by brew. How do I uninstall python 3.10 clearly. It would be nice if the downloaded software has a uninstall application o…
🌐
Local Host
locall.host › home › uninstall › mastering homebrew: a step-by-step guide to uninstalling python effortlessly
Mastering Homebrew: A Step-by-Step Guide to Uninstalling Python Effortlessly
August 10, 2023 - Replace ‘[email protected]’ with the appropriate Python version: “` brew uninstall –ignore-dependencies [email protected] “` Note: The ‘–ignore-dependencies’ flag is used to prevent Homebrew from uninstalling other packages that depend on the target Python version.
🌐
iBoysoft
iboysoft.com › home › how to tips › how to uninstall python on mac completely? (4 ways)
How to Uninstall Python on Mac Completely? (4 Ways)
January 29, 2026 - Follow the steps below: Open Terminal. Run the command below after replacing version_number to uninstall Python.brew uninstall python@version_numberIf you want to Python 3.8.5 on Mac, change the command to: brew uninstall [email protected]
🌐
Super User
superuser.com › questions › 1837984 › homebrew-and-python-2-7-3-6-3-7-3-8-3-9-3-10-3-11-and-3-12-how-to-clean-t
Homebrew and Python 2.7, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12: How to clean them all? - Super User
April 5, 2024 - If you want to clean up Homebrew installs of Python, you should be able to safely rm -rf those directories. Or you can open up each directory like this: open /usr/local/Cellar/ open /usr/local/lib/ open /usr/local/bin/ And just use the Finder ...
🌐
MacUpdate
macupdate.com › how-to › how to uninstall python on mac
How to Uninstall Python on Mac [Updated 2020] MacUpdate
July 6, 2020 - Run the command ‘brew cleanup’ as instructed to remove all broken symlinks. The symlinks referencing Python frameworks are in the /usr/local/bin directory.
🌐
Switching To Mac
switchingtomac.com › home › how-to › how to completely uninstall python on your mac
How to Completely Uninstall Python on Your Mac
January 27, 2025 - To uninstall these Python packages, type and run the brew uninstall python_package command in the Terminal, replacing python_package with the appropriate package name you identified in the previous step (eg.
🌐
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?

🌐
Educative
educative.io › answers › how-to-uninstall-python
How to uninstall Python
Moving the Python application to trash will not remove Python entirely. Furthermore, a built-in Python distribution might not appear in the “Applications” folder. So we’ll have to use the “Terminal” to uninstall it manually.
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.