Skip to content

Instantly share code, notes, and snippets.

@yegorg
Last active August 7, 2017 09:57
Show Gist options
  • Save yegorg/51eec7cfb5b9b2a7acffcf611000d019 to your computer and use it in GitHub Desktop.
Save yegorg/51eec7cfb5b9b2a7acffcf611000d019 to your computer and use it in GitHub Desktop.
Full update Debian/Ubuntu system packages & Full update all Python packages installed
#!/bin/bash
###
### Automatic updates
### Debian 8+ / Ubuntu 16.04+
### Full system upgrade with APT
### Python 2.x/3.x upgrade installed packages with PIP
###
echo " "
echo "========================================================================================="
echo " Upgrading system and cleaning outdated packages. Please stand-by..."
echo "========================================================================================="
echo " "
sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y
echo " "
echo "========================================================================================="
echo " Upgrading Python 2.x/3.x installed packages. Please stand-by..."
echo "========================================================================================="
echo " "
sudo pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 sudo pip install -U
echo " "
echo "========================================================================================="
echo " Completed..."
echo "========================================================================================="
echo " "
sleep 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment