Vagrant: destroy not working

vagrantvagrantfilevirtualbox

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?

Best Answer

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.