Update a Vagrant Box?
32,553
Finally, you can update boxes with
vagrant box update
. This will download and install the new box. This will not magically update running Vagrant environments. If a Vagrant environment is already running, you'll have to destroy and recreate it to acquire the new updates in the box. The update command just downloads these updates locally.
Related videos on Youtube
Author by
Steven
Updated on August 23, 2021Comments
-
Steven over 2 years
I have updated a box
vagrant box update
and now when I runvagrant up
it boots into the old box. How can I update my box to use the newer version? -
Steven over 9 yearsSo I need to run
vagrant destroy
and thenvagrant up
? -
Joe over 9 years
vagrant reload
The equivalent of running a halt followed by an up. -
djfried over 8 yearsreload wont do it.. you need destroy
-
giovannipds about 7 yearsCan I run
vagrant box update
in parallel when I already have a machine running? stackoverflow.com/questions/42721065/… -
Ryan over 6 yearsI had to run
vagrant box remove laravel/homestead --box-version 1.1.0
so thatvagrant up
would then run the 4.0 version. -
GusDeCooL almost 5 years@Joe based on
vagrant box update -h
> Updates the box that is in use in the current Vagrant environment, if there any updates available. This does not destroy/recreate the machine, so you'll have to do that to see changes. Looks like we will need to destroy and up again. -
redanimalwar over 3 yearsTo finally answer @Steven 's question: In my case yes. I ran
vagrant destroy
after looking up how to update the box without doing anything b4 that.vagrant box update
did not work after that, it said the new box was not downloaded and it could not update to it. So I just ranvagran up
and it downloaded the new box and provisioned it from scratch as expected. -
Gonçalo Ribeiro over 2 yearsTo update a specific box you can use the
--box
argument. For examplevagrant box update --box archlinux/archlinux
.