Removing list of vms in vagrant cache

后端 未结 5 1872
梦谈多话
梦谈多话 2021-01-29 20:47

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

相关标签:
5条回答
  • 2021-01-29 21:20

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

    vagrant global-status --prune
    
    0 讨论(0)
  • 2021-01-29 21:25

    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.

    0 讨论(0)
  • 2021-01-29 21:27

    --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.

    0 讨论(0)
  • 2021-01-29 21:30

    I used

    vagrant global-status --prune
    vagrant box remove -f [name]
    

    Also I removed

    ~/.vagrant, ~/.vagrant.d and .vagrant. 
    

    And manually removed lingering VMs if exists.

    0 讨论(0)
  • 2021-01-29 21:43

    Use vagrant box remove -f [name]

    It works. Guaranteed!

    0 讨论(0)
提交回复
热议问题