pip list: Inspect Installed Packages Command Reference
See exactly what is installed in this environment.
pip list prints installed packages and their versions. It is a quick way to confirm what a CI environment actually resolved to, and to flag outdated dependencies.
Common flags / usage
- pip list -- human-readable table of installed packages
- -o, --outdated -- show only packages with newer versions
- --format json -- machine-readable output for scripts
- --format freeze -- requirements-style output
- --not-required -- list packages no other package depends on
Example
shell
- run: pip list --format=json > installed.json
# Audit step: surface outdated dependencies (non-blocking)
- run: pip list --outdated || trueIn CI
The default table has header rows that break naive grep/awk parsing; use --format=json or --format=freeze when a script consumes the output. --outdated is handy in a scheduled audit job.
Key takeaways
- pip list shows every installed distribution and its version.
- Use --format=json for reliable machine parsing.
- --outdated surfaces dependencies with newer releases for audits.
Related guides
pip freeze: Pin the Environment Command ReferenceReference for pip freeze in CI: snapshotting installed versions into requirements.txt, excluding editable/VCS…
pip check: Verify Dependencies Command ReferenceReference for pip check in CI: detecting broken or conflicting installed dependencies, its non-zero exit as a…
pip install: Command Reference for CIReference for pip install in CI pipelines: installing packages, pinning versions, common flags, a GitHub Acti…