WindowsmacOSLinux

Where Does Vagrant Store Boxes?

Where Vagrant keeps downloaded boxes, plugins and global state in .vagrant.d, and the variable that moves it.

Last updated

Vagrant keeps global state in ~/.vagrant.d (or %USERPROFILE%\.vagrant.d on Windows): downloaded boxes in boxes/, plugins in gems/, plus licenses and insecure keys. Project folders only hold the Vagrantfile and a small .vagrant directory; the heavy box images all pool in the home folder.

That split is why destroying a VM barely frees disk: the box stays cached for the next vagrant up. Run vagrant box list to see what the cache actually holds before deleting anything by hand, since versioned subfolders look redundant but are addressed by name.

Where Vagrant stores this, by platform

Windows
%USERPROFILE%\.vagrant.d\boxes

Same layout on every OS, only the home prefix changes. VAGRANT_HOME relocates the whole folder. Per project state lives in .vagrant/ inside each project, not here.

macOS
~/.vagrant.d/boxes

Boxes version in subfolders (name/version/provider). Prune with vagrant box prune. Plugins live in the gems sibling.

Linux
~/.vagrant.d/boxes

Same as macOS. Headless servers often set VAGRANT_HOME to a data volume in the shell profile so boxes survive home directory quotas.

Frequently asked questions

My boxes folder is enormous. How do I clean it?

Run vagrant box prune. It deletes old versions of boxes while keeping the newest per box, which reclaims the gigabytes that accumulate across update cycles. Boxes currently in use by a VM are left alone.

How do I move Vagrant home off a full drive?

Set VAGRANT_HOME to the new directory before running any vagrant command, then move the old folder contents across. Boxes, plugins and licenses follow the variable together, so nothing needs reinstalling.

Notice an outdated path? Let us know.