【发布时间】:2016-12-13 08:21:37
【问题描述】:
我只想删除本地机器中的所有 Vagrant 框。这是我的盒子:
$ vagrant box list
centos/7 (virtualbox, 1509.01)
coreos-alpha (virtualbox, 1010.1.0)
每行中的第一个字符串(例如“centos/7”)似乎是盒子名称,所以我尝试了以下命令:
$ vagrant box list | awk '{ print $1; }' | xargs vagrant box remove
我只是想获取第一个字符串并使用 xargs 将其传递给vagrant box remove,因为我希望将字符串作为命令的参数。但是,我以某种方式收到以下错误。我错过了什么?
This command was not invoked properly. The help for this command is
available below.
Usage: vagrant box remove <name>
Options:
-f, --force Remove without confirmation.
--provider PROVIDER The specific provider type for the box to remove
--box-version VERSION The specific version of the box to remove
--all Remove all available versions of the box
-h, --help Print this help
谢谢,
【问题讨论】: