← 返回命令列表

Linux command

vagrant-destroy 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Destroy VM

vagrant destroy

Force destroy without confirmation

vagrant destroy -f

Destroy specific VM

vagrant destroy [name]

Gracefully shut down

vagrant destroy --graceful

说明

vagrant destroy stops and deletes all resources for a Vagrant machine. Removes the virtual machine and associated storage. The Vagrantfile and provisioning remain intact.

参数

-f, --force
Destroy without confirmation prompt.
-g, --graceful
Gracefully shut down the machine before destroying it.
--no-parallel
Enable or disable parallel destruction of multiple machines. Enabled by default if the provider supports it.

FAQ

What is the vagrant-destroy command used for?

vagrant destroy stops and deletes all resources for a Vagrant machine. Removes the virtual machine and associated storage. The Vagrantfile and provisioning remain intact.

How do I run a basic vagrant-destroy example?

Run `vagrant destroy` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f, --force do in vagrant-destroy?

Destroy without confirmation prompt.