Vagrant boxを削除する

Vagrant boxを削除する

Vagrantで、boxを削除する手順を記述してます。

環境

  • OS windows10 pro
  • Vagrant 2.3.1

boxを削除

boxを削除するには、「 box remove 」コマンドを使用します。

> vagrant box remove box名

実際に、削除してみます。まずは、boxを一覧で確認します。

> vagrant box list

boxomatic/centos-stream-9 (virtualbox, 20220921.0.1)
rockylinux/8              (virtualbox, 5.0.0)
ubuntu/trusty64           (virtualbox, 20190514.0.0)

「ubuntu/trusty64」を削除します。
※「y」を選択すると削除されます。

> vagrant box remove ubuntu/trusty64

Box 'ubuntu/trusty64' (v20190514.0.0) 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:

default (ID: 73ff251a6d394ae686c53f9dd81d5bdf)

Are you sure you want to remove this box? [y/N] y
Removing box 'ubuntu/trusty64' (v20190514.0.0) with provider 'virtualbox'...