Skip to content

Instantly share code, notes, and snippets.

@unkwn1-repo
Last active July 11, 2021 14:49
Show Gist options
  • Save unkwn1-repo/5f424a35e663782ce28438eb94b11f6e to your computer and use it in GitHub Desktop.
Save unkwn1-repo/5f424a35e663782ce28438eb94b11f6e to your computer and use it in GitHub Desktop.
A one liner I use to auto update any outdated pip modules in an environment

Updating Pip Packages

checks and auto updates

pip install -U $(pip list --outdated | awk 'NR>2 {print $1}')

check for outdated modules

pip list --outdated

awk

  • prints out the first columns of the pip oudated command using NR>2 to filter the first 2 rows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment