Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force Vagrant to re-provision or download a new box on next vagrant up

Tags:

vagrant

If I change the provision scripts or worse yet, the base OS, is there a way to force vagrant to either re-provision or re-download the base box? I tried to change the config.vm.box and config.vm.box_url, but vagrant up still happily booted up to old box.

I know I could use vagrant destroy and then vagrant up or vagrant provision for just re-provisioning on my own machine, but I'm talking about a way that automatically force my team to re-provision / reinitialize the box (e.g. after they do a git pull and then a vagrant up have it either re-provision or reinitialize appropriately.)

like image 367
apocryphalauthor Avatar asked Nov 14 '13 18:11

apocryphalauthor


1 Answers

vagrant box --help gives you some options.
Specifically, you can vagrant box remove <name> <provider> to remove a box, and force a re-provisioning.

For example, to remove the Vagrant sample box:

vagrant box remove precise32 virtualbox
like image 176
mattwise Avatar answered Sep 26 '22 07:09

mattwise