Uninstalling Python on macOS requires caution, as the system Python (in /usr/bin/python) is used by macOS and should not be removed. Doing so can break system functionality.

How to Safely Remove User-Installed Python Versions

The method depends on how Python was installed:

  • If installed via Homebrew (most common for users):

    • Open Terminal and run:

      brew uninstall python
    • To remove all Python versions managed by Homebrew:

      brew uninstall --ignore-dependencies python
    • Clean up leftover files:

      brew cleanup
      brew doctor
  • If installed via the official Python.org installer (e.g., Python 3.14):

    • Open Finder, go to Applications, and drag the Python 3.14 folder to the Trash.

    • Remove remaining files:

      sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.14
      sudo rm -rf /Applications/Python\ 3.14
    • Remove symlinks in /usr/local/bin:

      cd /usr/local/bin
      ls -l | grep '../Library/Frameworks/Python.framework/Versions/3.14' | awk '{print $9}' | xargs sudo rm
  • If installed via pyenv or MacPorts:

    • Use the respective tool’s uninstall command:

      pyenv uninstall 3.14

      or

      sudo port uninstall python314

Important Warnings

  • Never delete /usr/bin/python or /usr/bin/python3 — these are part of macOS and critical to system stability.

  • Removing Python may cause issues with system tools, Xcode, or third-party apps that depend on it.

  • If you're unsure how Python was installed, check with:

    which python3
    python3 --version

    This reveals the installation path.

Final Recommendation

Do not uninstall Python unless absolutely necessary. It’s safe to leave it installed, as it uses minimal space and doesn’t interfere with daily use. If you need a clean environment, use virtual environments instead.

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
Answer from zayadur on Stack Overflow
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
🌐
Python.org
discuss.python.org › python help
Removing older versions of Python from iMac - Python Help - Discussions on Python.org
November 30, 2023 - I have 2 Python folders, 3.6 and 3.7 in my applications folder on my iMac. Is there a tutorial that exists anywhere to explain how to safely and reliably remove these versions of Python?
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)
Do I need to uninstall the version of Python that came with my Mac?
No, and you shouldn’t. The system Python in /usr/bin/ is part of macOS and is used by system processes. Removing it can break your Mac.
🌐
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 do I uninstall Python from Terminal?
That depends on how you installed it. If it was installed via Homebrew, pyenv, or MacPorts, use the dedicated commands shown in the sections above. For Python IDLE (from Python.org), you can run our uninstall script in Terminal or use App Cleaner & Uninstaller.
🌐
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)
🌐
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.

🌐
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 your goal is to remove Python IDLE (the app bundle from the official installer), the quickest option is App Cleaner & Uninstaller by Nektony. It detects Python IDLE in the Applications folder, shows you all related files, and lets you remove ...
🌐
Python documentation
docs.python.org › 3 › using › mac.html
5. Using Python on macOS — Python 3.14.3 documentation
In here you find IDLE, the development environment that is a standard part of official Python distributions; and Python Launcher, which handles double-clicking Python scripts from the macOS Finder. A framework /Library/Frameworks/Python.framework, which includes the Python executable and libraries. The installer adds this location to your shell path. To uninstall Python, you can remove these three things.
🌐
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 - So feel free to delete Python installations you've made yourself, but you'd be wise to leave the system Python alone. ... You may uninstall Python manually from the Application folder, then check all possible folders for its traces.
Find elsewhere
🌐
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

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.
🌐
Python.org
discuss.python.org › python help
Uncluttering Python on my Mac - Python Help - Discussions on Python.org
April 28, 2023 - I just started out using Python a while ago and while my Python path isn’t XKCD material it is not neat. In fact I think it was the cause of a problem I had earlier in the week with an app I was trying to package. So I …
🌐
Apple Community
discussions.apple.com › thread › 253800176
How to remove python 2.7 from MacBook Pro… - Apple Community
April 5, 2022 - This discussion might be helpful: https://stackoverflow.com/questions/3819449/how-to-uninstall-python-2-7-on-a-mac-os-x-10-6-4
🌐
Apple Support
support.apple.com › en-us › 102610
Delete or uninstall apps on Mac - Apple Support
January 20, 2026 - Find out whether the app includes an "Uninstall" or "Uninstaller" app, which might be in the same folder as the app itself. If your app includes an uninstaller, it’s the best way to delete the app and any login items, extensions, or other data the app might have stored in other locations.
🌐
Apple Community
discussions.apple.com › thread › 252706797
Removing python 3 from macOS - Apple Community
April 27, 2021 - Here’s what a simple Google search produced. Be sure to read the instructions carefully, especially the part about not touching the pre-installed Python that is part of macOS. If you are not fully comfortable with doing this then don’t. https://nektony.com/how-to/uninstall-python-on-mac
🌐
Python.org
discuss.python.org › python help
How to remove all old installs of Python on iMac M1 - Python Help - Discussions on Python.org
November 3, 2023 - Just installed 3.12.0 but still see folders 3.9 and 3.10. What can I safely remove?
🌐
Quora
quora.com › How-do-I-find-and-uninstall-all-versions-of-Python-on-a-Mac-OS-X
How to find and uninstall all versions of Python on a Mac OS X - Quora
I am not at my mac to confirm, but I think “mdfind python” is one way (though quick, it can be too liberal in the results). Anothe way is to search the file system “find / -type f -name ‘python*’ “ which will report all files beginning with python.
🌐
XDA Developers
xda-developers.com › home › macos › how to uninstall python on macos
How to uninstall Python on macOS
September 26, 2024 - This should return your Mac to its stock configuration in relation to Python, complete with stub. However, any attempt to invoke the python3 command will prompt the user to install Python again, which you can install as part of Xcode. If you want a turnkey solution to your Python predicament, third-party uninstallers can help.
🌐
Educative
educative.io › answers › how-to-uninstall-python
How to uninstall Python
Select the Python version that you want to uninstall, then click the “Uninstall” button above the list.