How to Upgrade Python Developer Tools
The right upgrade command depends on how a tool was installed. If a handbook command doesn’t behave as documented, check the installed version first.
Check your version
uv --version
ruff --versionUpgrade global tools by install method
| Tool | Current version | Upgrade command |
|---|---|---|
| cibuildwheel | 4.2 | uv tool upgrade cibuildwheel |
| hatch | 1.18 | uv tool upgrade hatch |
| maturin | 1.15 | uv tool upgrade maturin |
| mypy | 2.3 | uv lock --upgrade-package mypy |
| pdm | 2.29 | pdm self update |
| pip | 26.2 | python -m pip install --upgrade pip |
| pixi | 0.80 | pixi self-update |
| poetry | 2.4 | poetry self update |
| pre-commit | 4.6 | uv tool upgrade pre-commit |
| pyrefly | 1.2 | uv tool upgrade pyrefly |
| pyright | 1.1.411 | uv tool upgrade pyright |
| pytest | 9.1 | uv lock --upgrade-package pytest |
| ruff | 0.16 | uv tool upgrade ruff |
| twine | 7.0 | uv tool upgrade twine |
| ty | 0.0.78 | uv tool upgrade ty |
| uv | 0.12 | uv self update |
A Homebrew install of uv needs brew upgrade uv, not uv self update. See How to upgrade uv for the full matrix.
Upgrade every CLI installed with uv tool install in one command:
uv tool upgrade --allUpgrade dev dependencies through the lockfile
Tools declared as project dev dependencies, such as pytest or mypy, upgrade through the lockfileA file that records the exact version of every installed package, so everyone working on the project gets identical installs. :
uv lock --upgrade-package pytest
uv sync
Last updated on