Skip to content

Instantly share code, notes, and snippets.

@xoner
Created August 1, 2017 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xoner/a3731665bcbce4964b1974be0e62ca82 to your computer and use it in GitHub Desktop.
Save xoner/a3731665bcbce4964b1974be0e62ca82 to your computer and use it in GitHub Desktop.
run apt update and apt dist-upgrade in all lxd vms running in your box
lxc list | grep \|\ | tail -n +2 | awk '{print $2}' | xargs -I {} bash -c 'printf "\nUpdating {}\n\n"; lxc exec {} -- bash -c "apt-get update && apt-get dist-upgrade -y";'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment