Skip to content

Instantly share code, notes, and snippets.

@st1vms
Last active August 14, 2025 09:22
Show Gist options
  • Save st1vms/3a2f89c47cba747077a3858d87ccb643 to your computer and use it in GitHub Desktop.
Save st1vms/3a2f89c47cba747077a3858d87ccb643 to your computer and use it in GitHub Desktop.
Upgrade all outdated Python packages at once
Upgrade all outdated Python packages at once
python3 -m pip install pip -U; pip list -o | grep -v -i warning | cut -f1 -d" " | tr " " "\n" | awk "{if(NR>=3)print}" | cut -d" " -f1 | xargs -n1 pip install -U
python -m pip install pip -U; pip list -o 2>$null | Select-Object -Skip 2 | ForEach-Object { ($_ -split '\s+')[0] } | ForEach-Object { pip install -U $_ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment