Skip to content

Instantly share code, notes, and snippets.

@aelindeman
Created September 20, 2016 20:48
Show Gist options
  • Save aelindeman/8d099bc8a6ee08601278ba9fba3e064b to your computer and use it in GitHub Desktop.
Save aelindeman/8d099bc8a6ee08601278ba9fba3e064b to your computer and use it in GitHub Desktop.
kill all running vagrant instances
function vslay() {
machines=`vagrant global-status | grep virtualbox | awk '{ print $1 }'`
echo "Destroying VMs: $(echo -n $machines | tr '\n' ' ')"
for i in $machines; do
vagrant destroy --force "$i"
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment