Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vagrant box remove command does not accept range in 'box-version' parameter #7503

Closed
VladRassokhin opened this issue Jun 20, 2016 · 2 comments

Comments

@VladRassokhin
Copy link

Vagrant version

Vagrant 1.8.4

Host operating system

$ uname -a
Linux unit-421 4.6.2-gentoo #1 SMP Thu Jun 16 16:22:10 MSK 2016 x86_64 Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz GenuineIntel GNU/Linux

Guest operating system

Non-applicable

Vagrantfile

Non-applicable

Debug output

Gist with both simple and debug output

Expected behavior

Remove all boxes within specified range (all except latest)

Actual behavior

Error output, nothing changed:

Steps to reproduce

  1. Have some history of updating outdated boxes
  2. Try to remove them all-at-once with e.g. vagrant box remove ubuntu/trusty64 --box-version '< 20160602.0.0'

References

N/A

@VladRassokhin VladRassokhin changed the title vagrant box remove command does not accepts range in 'box-version' parameter vagrant box remove command does not accept range in 'box-version' parameter Jun 20, 2016
@VladRassokhin
Copy link
Author

There's simple workaround: vagrant box list | grep ubuntu/trusty64 | awk '{print $3}' | sed 's/)$//' | grep -v 20160602 | xargs -n 1 vagrant box remove ubuntu/trusty64 --box-version

@sethvargo
Copy link
Contributor

Im gonna close this as it's closely related to #4412.

@hashicorp hashicorp locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants