I misspelled the name of a box when I added it to my box list:
vagrant box list
debian
ubnutu
Can I rename the box without repackaging it?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityYou can simply rename the dir that represents the box. If your vagrant files are in their default dir (i.e. /path/to/your/home/.vagrant.d) you can just do:
mv vagrant_path/boxes/box_to_rename vagrant_path/boxes/new_box_name
Also be sure to change the Vagrantfile to use the new label for the box. You just need to change the config.vm.box
directive to reflect the changes.
I would do this:
$ vagrant box repackage misspelled-name
[vagrant] Compressing package to: /Users/johndoe/package.box
$ vagrant box add correct-name /Users/johndoe/package.box
...
Not the worst to know about these two anyway, since you can frequently update base boxes (e.g. to update the kernel, software and guest additions) to avoid running all these required updates every time you vagrant up
.
On windows, you can rename the box folder name here. C:\Users\uday.vagrant.d\boxes\
It will update automatically