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 versions3.12.4- Uninstall Python 3.12.4 specifically[email protected]- Uninstall CPython 3.11.x[email protected]- 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>
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.cpythonorcp<implementation>@<version>e.g.[email protected]<implementation><version>e.g.cpython3.12orcp312<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
Uninstall a specific patch version
Uninstall multiple versions
Uninstall PyPy
Uninstall all managed Python versions
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
Version not found
Virtual environment errors after uninstall
If you see errors in virtual environments after uninstalling Python:See Also
uv python install- Download and install Python versionsuv python list- List available Python installationsuv python find- Find a Python installationuv python pin- Pin to a specific Python version