/commands/pip/pip-list-outdated
pip list --outdated: find outdated Python packages and upgrade them
- tool
- pip
- versions
- pip 20+
- os
- any
pip list --outdated (-o) compares every installed package with the latest version on the package index and prints the ones that are behind, with the installed version, the latest version and the file type. Upgrade a package from the list with pip install --upgrade name (-U). It only reads; nothing changes until you run the install.
List outdated packages
uv run -q --no-project --python 3.13 --with pip==25.2 --with six==1.16.0 --with idna==3.10 \
python -m pip list --outdated --disable-pip-version-checkOutput
Package Version Latest Type ------- ------- ------ ----- idna 3.10 3.20 wheel pip 25.2 26.2.2 wheel six 1.16.0 1.17.0 wheel
The example creates a throwaway environment with uv holding old versions of pip, six and idna; in your own environment the command is pip list --outdated. Version is what is installed, Latest is the newest release on the index, and Type says whether the latest is a wheel or a source distribution (sdist). The latest versions you see depend on the day you run it.
Useful variants
| Command | What it does |
|---|---|
| pip list -o | Short form of --outdated |
| pip list -u (--uptodate) | Only packages that are already current |
| pip list -o --not-required | Only top-level packages, not dependencies of other packages |
| pip list -o --format=json | Machine-readable output with name, version and latest_version |
| pip list -o --pre | Also consider pre-releases as the latest version |
| pip list -o --exclude pip | Leave a package out of the list |
| pip install -U requests | Upgrade one package to the latest version |
| pip install -U "requests<3" | Upgrade but stay below a version |
Upgrade what the list shows
pip list --outdated --format=json \
| python -c "import json,sys; print('\n'.join(p['name'] for p in json.load(sys.stdin)))" \
| xargs -n1 pip install -UThis upgrades every outdated package one by one. Prefer upgrading the packages you depend on directly (--not-required narrows the list), run your tests afterwards, then update the pins with pip freeze > requirements.txt.
Pitfalls
- Dependency conflicts. Upgrading a dependency past what another package allows makes pip print
ERROR: pip's dependency resolver does not currently take into account all the packages that are installedfollowed by the conflict. Runpip checkafter upgrades to see broken requirements. - System Python. On recent Debian, Ubuntu and Fedora releases,
pip install -Uoutside a virtual environment fails with externally-managed-environment. Do the upgrade inside a venv. - Index configuration. The Latest column comes from the configured index; with a private mirror it shows the newest version on that mirror, not on PyPI.
How to confirm it worked
Run pip list --outdated again: the upgraded packages disappear from the list. pip show name prints the new version, and pip check reports No broken requirements found. when the environment is consistent.
FAQ
Is there a pip command to upgrade all packages at once?
No. pip has no upgrade-all. You can feed the outdated list to pip install -U, but upgrading everything at once can break packages that need older versions; with a requirements file, raise the pins and reinstall instead.
Why is pip list --outdated so slow?
It asks the package index for the latest version of every installed package, one request per package. Large environments or a slow mirror make it take a while.
Why does pip list --outdated show pip itself?
pip is a package in the environment like any other. Upgrade it with python -m pip install --upgrade pip; the python -m form is needed on Windows because pip cannot replace its own running executable.