2013-09-03 18:08:28 +00:00
|
|
|
---
|
2016-01-19 18:08:53 +00:00
|
|
|
layout: "docs"
|
2013-09-06 16:50:43 +00:00
|
|
|
page_title: "vagrant destroy - Command-Line Interface"
|
2013-09-03 18:08:28 +00:00
|
|
|
sidebar_current: "cli-destroy"
|
2016-01-19 18:08:53 +00:00
|
|
|
description: |-
|
|
|
|
The "vagrant destroy" command is used to stop the running virtual machine and
|
|
|
|
terminate use of all resources that were in use by that machine.
|
2013-09-03 18:08:28 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Destroy
|
|
|
|
|
2016-04-12 11:45:10 +00:00
|
|
|
**Command: `vagrant destroy [name|id]`**
|
2013-09-03 18:08:28 +00:00
|
|
|
|
|
|
|
This command stops the running machine Vagrant is managing and
|
|
|
|
destroys all resources that were created during the machine creation process.
|
|
|
|
After running this command, your computer should be left at a clean state,
|
|
|
|
as if you never created the guest machine in the first place.
|
|
|
|
|
2015-11-26 17:22:23 +00:00
|
|
|
For linux-based guests, Vagrant uses the `shutdown` command to gracefully
|
|
|
|
terminate the machine. Due to the varying nature of operating systems, the
|
|
|
|
`shutdown` command may exist at many different locations in the guest's `$PATH`.
|
|
|
|
It is the guest machine's responsibility to properly populate the `$PATH` with
|
|
|
|
directory containing the `shutdown` command.
|
2013-09-03 18:08:28 +00:00
|
|
|
|
|
|
|
## Options
|
|
|
|
|
2016-01-19 18:08:53 +00:00
|
|
|
* `-f` or `--force` - Do not ask for confirmation before destroying.
|
2017-11-02 17:16:44 +00:00
|
|
|
* `--[no-]parallel` - Destroys multiple machines in parallel if the provider
|
|
|
|
supports it. Please consult the provider documentation to see if this feature
|
|
|
|
is supported.
|
2014-11-14 06:46:20 +00:00
|
|
|
|
|
|
|
<div class="alert alert-info">
|
2016-02-05 12:02:06 +00:00
|
|
|
The `destroy` command does not remove a box that may have been installed on
|
2016-01-19 18:08:53 +00:00
|
|
|
your computer during `vagrant up`. Thus, even if you run `vagrant destroy`,
|
|
|
|
the box installed in the system will still be present on the hard drive. To
|
|
|
|
return your computer to the state as it was before `vagrant up` command, you
|
|
|
|
need to use `vagrant box remove`.
|
|
|
|
|
|
|
|
For more information, read about the
|
|
|
|
<a href="/docs/cli/box.html">`vagrant box remove`</a> command.
|
2014-11-14 06:46:20 +00:00
|
|
|
</div>
|