Skip to content

How to Upgrade Python Developer Tools

The right upgrade command depends on how a tool was installed. Each handbook page shows a version badge; if a command doesn’t behave as documented, check your version first.

Check your version

uv --version
ruff --version

Compare with the table below.

Upgrade

ToolCurrent versionUpgrade command
hatch 1.18 uv tool upgrade hatch
maturin 1.14 uv tool upgrade maturin
mypy 2.3 uv lock --upgrade-package mypy
pdm 2.28 pdm self update
pip 26.2 python -m pip install --upgrade pip
pixi 0.76 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.72 uv tool upgrade ty
uv 0.12 uv self update

These commands assume the most common install method. A Homebrew install of uv needs brew upgrade uv, not uv self update. See How to upgrade uv for the full matrix.

To upgrade all tools installed with uv tool install at once:

uv tool upgrade --all

Upgrade dev dependencies through the lockfile

Tools in a project’s dev dependencies (pytest, mypy) upgrade through the lockfile:

uv lock --upgrade-package pytest
uv sync
Last updated on