Removing list of vms in vagrant cache

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.


You should use the following command to remove invalid entries from the global index:

vagrant global-status --prune

--prune didn't work for me. I removed ~/.vagrant, ~/.vagrant.d and .vagrant. And manually removed lingering VMs.

I migrated back gems and boxes from original ~/.vagrant.d. Perhaps one can try only removing machine from .vagrant but I didn't test that.

Tags:

Vagrant