Update a Vagrant Box?

32,553

From the Vagrant docs:

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.

Share:
32,553

Related videos on Youtube

Steven
Author by

Steven

Updated on August 23, 2021

Comments

  • Steven
    Steven over 2 years

    I have updated a box vagrant box update and now when I run vagrant up it boots into the old box. How can I update my box to use the newer version?

  • Steven
    Steven over 9 years
    So I need to run vagrant destroy and then vagrant up ?
  • Joe
    Joe over 9 years
    vagrant reload The equivalent of running a halt followed by an up.
  • djfried
    djfried over 8 years
    reload wont do it.. you need destroy
  • giovannipds
    giovannipds about 7 years
    Can I run vagrant box update in parallel when I already have a machine running? stackoverflow.com/questions/42721065/…
  • Ryan
    Ryan over 6 years
    I had to run vagrant box remove laravel/homestead --box-version 1.1.0 so that vagrant up would then run the 4.0 version.
  • GusDeCooL
    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
    redanimalwar over 3 years
    To 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 ran vagran up and it downloaded the new box and provisioned it from scratch as expected.
  • Gonçalo Ribeiro
    Gonçalo Ribeiro over 2 years
    To update a specific box you can use the --box argument. For example vagrant box update --box archlinux/archlinux.