Skip to content

Instantly share code, notes, and snippets.

@rklemme
Created October 13, 2011 07:14
Show Gist options
  • Save rklemme/1283629 to your computer and use it in GitHub Desktop.
Save rklemme/1283629 to your computer and use it in GitHub Desktop.
Update all packages on debian based system
#!/bin/sh -fe
# Do a complete apt update to the current
# state of affairs.
test `id -u` -eq 0 || exec sudo "$0" "$@"
set -x
apt-get update
apt-get autoremove --yes
apt-get dist-upgrade --auto-remove --yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment