development

How to Uninstall pip on macOS

To uninstall pip from macOS, remove the pip (and optionally pip3 ) executable(s) and associated metadata from your Python environment. The safest approach depends on how pip was...

Mara Ellison
How to Uninstall pip on macOS

Introduction and answer-first summary

To uninstall pip from macOS, remove the pip (and optionally pip3) executable(s) and associated metadata from your Python environment. The safest approach depends on how pip was installed (system Python, Homebrew, pyenv, virtual environments, or pipx). If pip belongs to the system Python, prefer leaving it intact; if it belongs to a user-managed installation, you can safely remove it. This guide explains verification, methods, and risks.

Understand what pip is and where it lives

What pip is on macOS

pip is the package installer for Python. On macOS, multiple Python installations can coexist (Apple-provided system Python, Homebrew Python, pyenv, Python.org installers, and pipx-managed environments). Which pip you remove matters, because removing the wrong one can break tools or your ability to manage packages for a given environment.

Where pip is installed

Pip is typically installed as a script inside a bin directory and a metadata directory containing package files. Common locations include:

  • /usr/local/bin/pip* (common for Homebrew or framework builds)
  • /usr/bin/pip* (Apple system Python, generally should be left alone)
  • ~/.local/bin/pip* (user installs via --user)
  • $VIRTUAL_ENV/bin/pip (inside active virtual environments)
  • /opt/local/bin/pip* (MacPorts)

Confirm which Python and pip you are using

Check active pip and Python paths

Always start by identifying the exact binaries and versions you intend to affect. Use which and pip --version to confirm location and ownership.

which pip3
pip3 --version
which python3
python3 --version

Examine the target of symlinks and confirm the underlying installation source (Homebrew, pyenv, or system). Commands such as ls -l $(which pip3) and python3 -m pip --version help verify linkage.

Verify safety before uninstalling pip

Do not remove system Python’s pip

Apple’s system Python at /usr/bin/python3 includes pip for its own tools. Removing it can disrupt system scripts and macOS internals that depend on those tools. Prefer user-managed Python installations for experimentation and development.

Virtual environments are safest to modify

Within an activated virtual environment, uninstalling pip only affects that environment, not your global system. Use python -m pip uninstall pip inside the environment when possible.

How to uninstall pip (safe, environment-focused)

Activate your environment first, then remove pip using Python’s module interface to keep removal consistent with the environment’s package manager state.

python -m pip uninstall pip setuptools wheel

Alternatively, delete the scripts and metadata manually if the above fails, but prefer the module approach for consistency.

User-level pip installed via --user or pipx

  • pipx: Use pipx uninstall <package> for apps; remove the entire pipx-managed installation by deleting its directory after backing up important data.
  • User install: Remove ~/.local/bin/pip* and associated metadata in ~/.local/lib/python*/site-packages/. Verify there are no other tools that depend on it.

Homebrew-managed Python

If Homebrew installed Python, you can uninstall the corresponding pip by removing the package:

brew uninstall python

This removes pip that came with that Homebrew Python. Reinstall with brew install python if needed later.

Manual removal and what to watch for

If you must manually delete executables and metadata, locate files by using pip show and cross-reference with filesystem paths. Typical manual steps include:

  • Remove executables: /usr/local/bin/pip3* (only if you’re certain they are not required)
  • Remove egg‑link or site‑packages entries pointing to the pip distribution
  • Clear caches cautiously: ~/.cache/pip is safe to delete but will only remove cached downloads

Always back up your environment (export package lists with pip freeze > requirements.txt) before mass removal.

Risks, dependencies, and recovery

Risks of removing the wrong pip

  • System tools that rely on Apple Python may behave unexpectedly.
  • Global CLI tools installed via pip may stop working.
  • Orphaned dependencies may accumulate if packages are removed without pip managing them.

Recovery if something breaks

If you break a user-level or Homebrew Python installation, reinstall the desired Python distribution (Homebrew or official installer) to restore pip and associated tools. For broken system tools, avoid reinstalling pip into /usr/bin; instead restore tools via the official macOS update path or reinstall the affected package manager.

Decision checklist: should you uninstall pip?

  • Is the pip owned by a virtual environment? → Safe to remove.
  • Is it user-installed via pyenv or Homebrew? → Remove with the Python installation.
  • Is it Apple’s system Python at /usr/bin? → Leave it; use a virtual environment instead.
  • Do CLI tools depend on pip-installed commands? → Keep pip or manage tools in isolation (e.g., pyenv, pipx).

Practical checklist and verification

Before and after removing pip, confirm your workflows still work. This quick table captures key verification points.

$(which python3) points to user or pyenv /usr/local/bin/python3 or pyenv shim $(which pip3) inside user or venv path pip --version reports expected environment pip --version fails or reports different env
Check Expected before removal Expected after safe removal (user env) Source/Notes
Active Python location User-managed install
Active pip location No pip3 in PATH or only system pip remains PATH order matters
System Python integrity /usr/bin/python3 exists and macOS tools work Unchanged Do not modify
Package management Expected for target environment

Alternatives to full uninstall

Instead of uninstalling pip, consider isolation strategies that avoid system breakage:

  • Use virtual environments (venv or venvwrapper) to keep pip local to projects.
  • Use pipx for installing and running Python applications in isolated environments.
  • Use a Python version manager like pyenv to manage multiple, isolated Python installations.

Final notes and maintenance tips

Treat system Python as read-only. Prefer user-level or virtual environment installs for development work. Keep backups (via pip freeze) and verify PATH ordering after changes. If in doubt, create a virtual environment instead of removing pip from shared locations.

Related Reading

More pages in this topic cluster.

For i in range 4: A Practical Guide to Python’s Range-Based Loop

In Python, the expression for i in range(4): iterates four times, with i taking the values 0, 1, 2, and 3. This sequence starts at 0 by default and stops before the stop value,...

Read next
Mermaid Recipe: A Technical Guide to Diagram-as-Code Syntax and Usage

Mermaid is a diagramming and charting tool that uses text-based definitions to generate flowcharts, sequence diagrams, class diagrams, Gantt charts, and more directly in the bro...

Read next
How to View a Website's Code

To view a website's code is to inspect the technologies, rules, and structure that define its layout, behavior, and content in a web browser. Most modern browsers ship with deve...

Read next