移除不在使用的vagrant的box
在用vagrant安装box的时候,有时会安装多个box版本,有时候会占用空间,这时候就需要清理这些已过期或者不在使用的box, 主要使用命令vagrant box prune
清除已过期的box
[D:\homestead]$ vagrant box list
laravel/homestead (virtualbox, 9.5.1)
laravel/homestead (virtualbox, 10.0.0-beta)
laravel/homestead (virtualbox, 10.0.0)
[D:\homestead]$ vagrant box prune
The following boxes will be kept...
laravel/homestead (virtualbox, 10.0.0)
Checking for older boxes...
Removing box 'laravel/homestead' (v10.0.0-beta) with provider 'virtualbox'...
Box 'laravel/homestead' (v9.5.1) with provider 'virtualbox' appears
to still be in use by at least one Vagrant environment. Removing
the box could corrupt the environment. We recommend destroying
these environments first:
homestead (ID: d28d5e1d54fd4c64805ccaedde4705df)
Are you sure you want to remove this box? [y/N] y
Removing box 'laravel/homestead' (v9.5.1) with provider 'virtualbox'...
[D:\homestead]$ vagrant box list
laravel/homestead (virtualbox, 10.0.0)