Cleanup old version of installed boxes in Vagrant

I use Vagrant with VVV extensively for setting up local development environments and have a couple of Vagrant boxes setup in my mac.

Recently I was running out of disk space in my Mac which prompted me to look around to see if there are any unnecessary files that can be cleaned up.

This let me to find out that Vagrant stores all versions of boxes that were downloaded even after upgrading them.

You can see the list of boxes that I have accumulated over a span of two years.

After seeing this list I was trying to find a way to cleanup the old version of installed boxes in Vagrant and found the following command.

vagrant box prune

Executing the above command cleaned up all unused old versions of the vagrant boxes and saved me about 20 GB of space.

I am adding this to the periodic list of cleanup commands that I run in my Mac.

Related posts

Tags: , ,

1 Comments so far

Follow up comments through RSS Feed | Post a comment

  • jeffiepriya says:

    Thank you for sharing such a nice and interesting blog with us. Hope it might be much useful for us. keep on updating…!!

Leave a Reply

Your email address will not be published. Required fields are marked *