Created
November 2, 2015 09:48
-
-
Save alwinmark/7caeac9218162c6370e0 to your computer and use it in GitHub Desktop.
Deletes everything from Virtualbox. Usefull for CI/CD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# loop over all existing VMs | |
for i in $(VBoxManage list vms | sed 's/.*{\(.*\)}/\1/g'); do | |
# power them off and delete them | |
VBoxManage controlvm $i poweroff && VBoxManage unregistervm $i; | |
# delete everything left | |
rm -rf ~/VirtualBox VMs | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment