Skip to content

Instantly share code, notes, and snippets.

@willgarcia
Last active August 29, 2015 13:57
Show Gist options
  • Save willgarcia/77a40e51762771946993 to your computer and use it in GitHub Desktop.
Save willgarcia/77a40e51762771946993 to your computer and use it in GitHub Desktop.
vboxmanage unregister vms by id
vboxmanage list vms | awk '{print $2;}' | xargs -I vmid VBoxManage unregistervm vmid --delete
VBOXID=$(vboxmanage list vms | grep packer | awk '{ print $2 }')
vboxmanage controlvm $VBOXID poweroff ; vboxmanage unregistervm $VBOXID --delete ; rm ~/VirtualBox\ VMs/packer-virtualbox-iso/* -rf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment