Skip to content

Instantly share code, notes, and snippets.

@mslinn
Created September 6, 2017 06:48
Show Gist options
  • Select an option

  • Save mslinn/f6fd658d3ca1a0ed3af0d7a088b59dab to your computer and use it in GitHub Desktop.

Select an option

Save mslinn/f6fd658d3ca1a0ed3af0d7a088b59dab to your computer and use it in GitHub Desktop.
Run this as a cron job every 24 hours to keep the system up to date
#!/bin/bash
sudo apt update && sudo apt-get -y --force-yes upgrade && sudo apt-get -y --force-yes autoclean && sudo apt-get -y --force-yes autoremove
if [ `which pip3` ]; then sudo -H pip3 install --upgrade pip; fi
if [ `which pip2` ]; then sudo -H pip2 install --upgrade pip; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment