Vagrant: destroy not working

jongbanaag picture jongbanaag · Apr 26, 2014 · Viewed 17.4k times · Source

How should I use the command vagrant destroy?

In my VagrantFile I used vm.config.name = 'websvr' and when I open Virtualbox I can see websvr on the list of Vm's.

But whenever I use vagrant destroy websvr it returns:

The machine with the name 'websvr' was not found configured for this Vagrant environment.

How does vagrant destroy work?

Answer

Michel Bilodeau picture Michel Bilodeau · Feb 19, 2015

It seems the item does not exist, but it appears in the list because it is present in the cache. Use vagrant global-status --prune to get rid of it.

See vagrant global-status documentation for more details.