The code for this plugin has been merged into Vagrant and is released in 1.9.0
. The command is vagrant box prune
. See the pull request.
This plugin enables you to automatically remove old vagrant boxes from you host. Just run vagrant remove-old-versions
and it will check your downloaded boxes and remove every box that is not the lastest downloaded version.
Internally it uses vagrant box list
to get a list of boxes, and vagrant box remove --box-version xxx --provider xxx
so it still has all safeguards you expect from vagrant.
vagrant plugin install vagrant-remove-old-box-versions
Usage: vagrant remove-old-versions [options]
Options:
-p, --provider PROVIDER The specific provider type for the boxes to destroy.
-n, --dry-run Only print the boxes that would be removed.
--name NAME The specific box name to destroy.
-f, --force Destroy without confirmation even when box is in use.
This plugin is built and maintained by Björn Brala Bug reports and pull requests are welcome on GitHub at swisnl/vagrant-remove-old-box-versions.
The gem is available as open source under the terms of the MIT License.
- This plugin was merged into Vagrant. Added deprecation message.
---dry-run
and--name
option added by @danielpanteleit
- Initial release.