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.
Answer from Ned Deily on Stack Overflow
🌐
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?
🌐
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

Discussions

install - Remove and Reinstall Python on Mac -- Can I trust these old references? - Ask Different
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: More on apple.stackexchange.com
🌐 apple.stackexchange.com
May 25, 2017
How to remove all old installs of Python on iMac M1
Just installed 3.12.0 but still see folders 3.9 and 3.10. What can I safely remove? More on discuss.python.org
🌐 discuss.python.org
0
0
November 3, 2023
How to completely uninstall Python 3 on macOS? - Stack Overflow
However, a more general solution ... your mac will clean up the files included with the installer, and will be resilient to most installer changes in the future. ... My old install (3.8) didn't support this, but the newer one (3.11) did. Not sure when they implemented a proper package. Could possibly be an option in the installer I missed in the earlier version. 2023-08-23T18:00:31.607Z+00:00 ... Turns out I had used Homebrew to install it. Used: brew uninstall [email ... More on stackoverflow.com
🌐 stackoverflow.com
terminal - My Mac has Python3 and 2.7 installed. How do I uninstall Python3 but keep 2.7? - Ask Different
Specifying a version of macOS would help as well since the steps to remove system software change quite a bit recently. ... There’s no need to uninstall python3 if you remove the executable from your path. Just keep calling the older version or use a tool like pyenv to juggle which is preferred ... More on apple.stackexchange.com
🌐 apple.stackexchange.com
February 21, 2017
People also ask

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)
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)
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)
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.

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.
🌐
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.
🌐
GitHub
gist.github.com › dlzi › c2cb7e39835cb2da868de47394cd4e83
How to uninstall Python 3.x on a macOS · GitHub
1. DO NOT attempt to remove any Apple-supplied system Python which are in /System/Library and /usr/bin. 2. Multiple Python versions can coexist pacifically on macOS. So, uninstalling Python is purely optional.
Find elsewhere
🌐
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 - For Python IDLE (from Python.org), you can run our uninstall script in Terminal or use App Cleaner & Uninstaller. ... If Python is installed, you’ll see the version number. You can also type python2 --version on older macOS releases.
🌐
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?
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
🌐
XDA Developers
xda-developers.com › home › macos › how to uninstall python on macos
How to uninstall Python on macOS
September 26, 2024 - While we advise you not to uninstall Python, you can do so by following these steps on your Mac: Launch the Terminal app. Enter which python3 and hit the return button. Make a note of your Python version number (displayed after /Versions), as well as the entire address displayed in the Terminal, since you will replace the [version number] and [address above] with the actual number and address in the following command, as well as remove "/bin/python3" from the command line.
🌐
Educative
educative.io › answers › how-to-uninstall-python
How to uninstall Python
Python is uninstalled differently in Windows, macOS, and Linux. To uninstall Python from Windows, follow these steps: ... Click “Uninstall a program,” and a list of all the currently installed programs will be displayed. Select the Python version that you want to uninstall, then click the “Uninstall” button above the list.
🌐
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 - Step 1. Cleaning > Smart Uninstaller · Step 2. Select Start Scan · Step 3. Tick the required app and click on Remove Selected ... Open Finder > Applications. Look for Python. Find the version of Python you want to delete.
🌐
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
Answer (1 of 4): You should not do this. Python is part of the operating system’s core files and it expects to find Python installed. There are a number of system scripts that rely on it.
🌐
w3tutorials
w3tutorials.net › blog › safe-way-to-uninstall-old-version-of-python
How to Safely Uninstall Old Python Versions on Mac: Avoiding Risks with `rm -fr` Commands — w3tutorials.net
Running sudo rm -fr /usr/bin/python would break core macOS functionality. rm -fr deletes files permanently—no trash bin recovery. A typo like sudo rm -fr /usr/local/bin/python3 (correct) vs. sudo rm -fr /usr/local/bin/python3* (deletes unintended ...
🌐
MacUpdate
macupdate.com › how-to › how to uninstall python on mac
How to Uninstall Python on Mac [Updated 2020] MacUpdate
July 6, 2020 - If you would like to remove a single version, only remove the file relevant to that version. If the following dialog box gets prompted, please enter the password. Next, go to the Trash directory. Right-click on the folder and select Delete Immediately. Deleting the Python folders will not completely uninstall Python from your system.
🌐
Osx Uninstaller
osxuninstaller.com › uninstall-guides › properly-uninstall-python-mac
How Can I Properly Uninstall Python from Mac (Solved)
The drag-to-delete method works in all versions of Mac OS X. Once installed properly, most apps can be smoothly uninstalled in that way, though it may not applicable to some built-in apps. If you fail to move an app to the Trash, try to select the app icon, hold the Option key, and choose Empty Trash from the Finder menu. If you installed the earlier version of Python, you can take this method to uninstall it from your Mac.
🌐
Delft Stack
delftstack.com › home › howto › python › uninstall python on mac os
How to Uninstall Python on macOS | Delft Stack
March 11, 2025 - Uninstalling Python from your macOS can be a straightforward process, but it’s essential to follow the right steps to avoid leaving residual files behind. Whether you’re looking to free up space, switch versions, or just clean up your development environment, this tutorial will guide you ...