移除不在使用的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)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM