Updating all outdated packages on Linux

suggest change

pip doesn’t currently contain a flag to allow a user to update all outdated packages in one shot. However, this can be accomplished by piping commands together in a Linux environment:

pip list --outdated --local --format=columns | awk 'NR>2 {print $1}' | xargs -n1 pip install -U

pip list defaults to columns, not name==version. --format=freeze cannot be combined with --outdated, so cutting on = does not yield package names. NR>2 skips the header and the separator line. The first column is the package name, and that name is passed to pip install -U. At the end of this process, all local packages should be updated.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents