I deleted a folder containing a running Vagrant box before realising it was still running.
How can I delete it from Vagrant (global-status) now?
I already removed the Virtualbox VM.
First you use vagrant global-status to list all the vagrant machines and their status and ids . after that if you run vagrant global-status again you will find that the id you have specified in the vagrant destroy -f command has been removed from the list.
Command: vagrant destroy [name|id] This command stops the running machine Vagrant is managing and destroys all resources that were created during the machine creation process. After running this command, your computer should be left at a clean state, as if you never created the guest machine in the first place.
To discard old boxes listed in vagrant global-status
(eg. you deleted the folder containing the .vagrant
dir from the filesystem) you just need to run:
vagrant global-status --prune
You might need to remove the Virtual Machine directly from your provider (VMWare, Virtualbox, ..) control interface.
I believe that the new filename of the global data is ~/.vagrant.d
.
So you can run rm -r ~/.vagrant.d
to delete all user data for a fresh start.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With