From the course: Learning Vagrant

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Halting and destroying boxes

Halting and destroying boxes - Vagrant Tutorial

From the course: Learning Vagrant

Start my 1-month free trial

Halting and destroying boxes

- [Instructor] A running box can be shut down with a simple command. In your command window, execute the following command in the My First Box environment. Vagrant halt. This command will send a shutdown signal to the box. The guest operating system will attempt to shut down gracefully. A box that has been shut down can be restarted with a vagrant up at any time. However, let's suppose you want to start over in your environment. You've made changes to the box that you want to discard, and start from the initial state of the box as it was the first time you booted it. Let's try that now. In your command window, execute the following command. Vagrant destroy. This command will delete all of the resources associated with your box in this environment, but it will leave the Vagrant file intact. You just hit y to accept. You can now run vagrant up to restart the box. The bento/ubuntu 16.04 box will be re-imported and started in its initial state. By the way, this box and all boxes on…

Contents