Removing list of vms in vagrant cache
I'm not looking for this answer, because my question is different.
When I type vagrant global-status
I get a list of vms, but some of those directories and VMs have been deleted along with the Vagrantfiles.
But when i type vagrant destroy [machineid]
, I get the following error, which I am looking to resolve. Please advise.
The working directory for Vagrant doesn't exist! This is the
specified working directory:
/Users/steven/projects/php/vagrant-laravel
Solution 1:
You should use the following command to remove invalid entries from the global index:
vagrant global-status --prune
Solution 2:
I had this issue as well. I was able to fix it by modifying the contents of ~/.vagrant.d/data/machine-index/index
. It's in JSON format so I just removed the data related to instances that no longer existed.
I only removed the data that pertained to instances that no longer exist. I wouldn't modify any data that relates to an instance that exists in the file system.