To uninstall Python on a Mac safely, remove only the Python versions you deliberately installed — from python.org, Homebrew, or pyenv — and leave any Apple-provided system Python alone, because deleting it can break parts of macOS. Cleaning up old, unpatched Python runtimes is good security hygiene: a stale interpreter with vulnerable bundled libraries is one more thing on your machine that never gets updated. This guide walks through how to uninstall Python on Mac by installation method, and how to tell which Pythons are safe to remove.
First, find out what you actually have
Before removing anything, inventory your Pythons. Different install methods put binaries in different places, and you want to know what you are deleting:
# What resolves right now
which -a python3 python
# All the versions on PATH
type -a python3
# Homebrew's view
brew list --versions | grep -i python
# pyenv's view
pyenv versions
Look at the paths. /usr/bin/python3 is managed by macOS and the Xcode command line tools — do not remove it. /Library/Frameworks/Python.framework/... is a python.org installer build. /opt/homebrew/... (Apple Silicon) or /usr/local/... (Intel) is Homebrew. ~/.pyenv/versions/... is pyenv. Knowing the source tells you the correct removal method.
The one rule: never delete the system Python
Older macOS shipped a /usr/bin/python (Python 2), which Apple has since removed. Current macOS provides /usr/bin/python3 tied to the developer tools. Do not rm anything under /usr/bin or /System. macOS and various built-in scripts may rely on it, and on system-integrity-protected paths you often cannot delete it anyway without disabling protections you should leave on. If the system Python is outdated, that is Apple's job to patch through OS updates, not yours to delete.
The safe mental model: you remove Pythons you installed, into user or Homebrew locations. You never touch Pythons the operating system installed.
Uninstalling a python.org installer build
The python.org .pkg installer drops a framework and a set of symlinks. To remove it cleanly:
# 1. Remove the framework for the specific version (adjust 3.11)
sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.11
# 2. Remove the Applications folder it created
sudo rm -rf "/Applications/Python 3.11"
# 3. Clean the broken symlinks it left in /usr/local/bin
find /usr/local/bin -lname '/Library/Frameworks/Python.framework/*' -delete
Run the find with -print first instead of -delete if you want to see what it will remove. Do this per version; keeping /Library/Frameworks/Python.framework/Versions/ intact but empty is fine.
Uninstalling a Homebrew Python
If Homebrew installed it, let Homebrew remove it so its own bookkeeping stays consistent:
brew uninstall python@3.11
# If other formulae depend on it, Homebrew will warn you.
# Clean up orphaned dependencies afterward:
brew autoremove
brew cleanup
Be aware that many Homebrew packages depend on a Homebrew Python. If brew uninstall complains about dependents, that Python is load-bearing for other tools — either keep it or uninstall the dependents first. Forcing removal with --ignore-dependencies can leave those tools broken.
Removing pyenv-managed versions
pyenv is the cleanest case because it is designed for exactly this:
# Remove one version
pyenv uninstall 3.10.13
# Or delete the directory directly
rm -rf ~/.pyenv/versions/3.10.13
To remove pyenv entirely, delete ~/.pyenv and strip the pyenv init lines from your shell profile (~/.zshrc or ~/.bash_profile).
Clean up PATH and shell config
After removing interpreters, stale PATH entries and aliases can leave you with commands that point at deleted binaries. Open your shell profile and remove lines that reference paths you just deleted:
# Inspect what your shell adds
grep -nE 'python|pyenv|Python.framework' ~/.zshrc ~/.bash_profile ~/.profile 2>/dev/null
Delete or fix the offending lines, then open a fresh terminal and re-run which -a python3 to confirm you are left only with the interpreters you intended to keep. Also clear per-user package caches if you want the space back: rm -rf ~/Library/Caches/pip.
The security payoff
Why bother beyond tidiness? Every Python you keep is a runtime whose standard library and bundled pip/setuptools age. An interpreter you forgot about will not get security updates, and tooling that shells out to "python3" might silently pick the oldest one on your PATH. Keeping a single, current, maintained Python (plus pyenv if you need multiple deliberately) reduces the number of unpatched runtimes an attacker could leverage if they land code execution on your box. Fewer, current interpreters is the same principle as trimming unused dependencies — less to keep patched, less to go wrong.
FAQ
Will uninstalling Python break my Mac?
Only if you delete the system Python at /usr/bin/python3 or anything under /System. macOS relies on it. Remove only the Pythons you installed yourself via python.org, Homebrew, or pyenv, and your Mac stays healthy.
How do I know which Python is safe to remove?
Run which -a python3 and check the paths. /usr/bin and /System are Apple's — leave them. /Library/Frameworks/Python.framework is python.org, /opt/homebrew or /usr/local is Homebrew, and ~/.pyenv is pyenv. Those three you may remove with the matching method.
How do I completely remove a python.org installation?
Delete the versioned framework folder under /Library/Frameworks/Python.framework/Versions/, remove its /Applications folder, and clean the broken symlinks it left in /usr/local/bin. Do this per version and then verify with which -a python3.
Why remove old Python versions at all?
Old interpreters stop getting security updates, and their bundled pip and standard library age. Tools that call "python3" may silently use the oldest one on your PATH. Keeping one current, maintained Python reduces unpatched runtimes on your machine.