Skip to content

Instantly share code, notes, and snippets.

@davidlj95
Last active June 18, 2018 17:52
Show Gist options
  • Save davidlj95/ccbe929740cd7469b0e8bd3390cb1bf3 to your computer and use it in GitHub Desktop.
Save davidlj95/ccbe929740cd7469b0e8bd3390cb1bf3 to your computer and use it in GitHub Desktop.
Updates all outdated Python packages using `pip`
#!/bin/bash
# Name: `pip` package updater
# Description: checks `pip` outdated packages and updates them all at once
# Source:
# https://stackoverflow.com/questions/2720014/upgrading-all-packages-with-pip
pip list --outdated --format=freeze | \
grep -v '^\-e' | \
cut -d = -f 1 | \
xargs -n1 pip install -U
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment