Skip to main content

Synopsis

Description

Uninstall Python versions. Removes Python installations that were installed by uv. System Python installations cannot be uninstalled. Either specific Python versions must be provided, or use --all to uninstall all managed Python versions.

Arguments

<TARGETS>...

The Python version(s) to uninstall. See uv help python to view supported request formats. Required unless --all is specified. Examples:
  • 3.12 - Uninstall all Python 3.12.x versions
  • 3.12.4 - Uninstall Python 3.12.4 specifically
  • cpython@3.11 - Uninstall CPython 3.11.x
  • pypy@3.10 - Uninstall PyPy 3.10

Options

Installation Directory

-d, --install-dir <INSTALL_DIR>

The directory where the Python was installed.
  • Type: Path
  • Default: ~/.local/share/uv/python
  • Environment variable: UV_PYTHON_INSTALL_DIR

Uninstall All

--all

Uninstall all managed Python versions.
  • Conflicts with: <TARGETS>
Warning: This will remove all Python versions installed by uv.

Version Request Formats

The following Python version request formats are supported:
  • <version> e.g. 3, 3.12, 3.12.3
  • <version-specifier> e.g. >=3.12,<3.13
  • <version><short-variant> e.g., 3.13t, 3.12.0d
  • <version>+<variant> e.g., 3.13+freethreaded, 3.12.0+debug
  • <implementation> e.g. cpython or cp
  • <implementation>@<version> e.g. cpython@3.12
  • <implementation><version> e.g. cpython3.12 or cp312
  • <implementation><version-specifier> e.g. cpython>=3.12,<3.13
  • <implementation>-<version>-<os>-<arch>-<libc> e.g. cpython-3.12.3-macos-aarch64-none

Output Format

Successful Uninstall

Multiple Versions

Version Not Found

Uninstall All

No Managed Pythons

Examples

Uninstall a specific version

Removes all Python 3.12.x installations.

Uninstall a specific patch version

Removes only Python 3.12.4.

Uninstall multiple versions

Removes Python 3.10.x and 3.11.x.

Uninstall PyPy

Uninstall all managed Python versions

Warning: This removes all Python versions installed by uv.

Uninstall from custom directory

Uninstall specific full key

Check before uninstalling

Use Cases

Free up disk space

Clean installation

Remove after upgrading

Test environment cleanup

Migration cleanup

Script cleanup

Selective cleanup

Verify and uninstall

Reinstall

Important Notes

Virtual Environments

Warning: Uninstalling a Python version will break any virtual environments that use it.

System Python

uv cannot uninstall system Python installations. Only Python versions installed by uv can be removed.

Executables

Uninstalling a Python version also removes associated executables installed in the bin directory.

No Confirmation

The uninstall command does not ask for confirmation. Use carefully, especially with --all.

Verification

After uninstalling

Check disk space freed

Troubleshooting

Cannot uninstall system Python

uv only uninstalls Python versions that it installed. System Python (from your OS package manager, Homebrew, etc.) cannot be removed by uv.

Version not found

The requested Python version is not installed, or it’s a system installation that uv doesn’t manage. Check installed versions:

Virtual environment errors after uninstall

If you see errors in virtual environments after uninstalling Python:

See Also