$ pip list --user --outdated --format=json | jq ".[].name" | xargs pip install --user --upgrade
pip list --user --outdated
will list all user-installed packages that are outdated. We use jq
to extract the package names from the output, and feed it to xargs
.