Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Making smaller base boxes #343
Using the following procedure when creating the base box can greatly reduce it's size.
I tested by using the lucid32 base. This box is 479MB from the website.
This cuts the box down to 390MB
If you go further and remove packages that won't be needed by most ie
You can bring the box size down to 360MB. This one might not be worth doing but the first is probably a good idea.
I have just did a test, and it seems that this is not working anymore. Once I have package the vagrant bo the size was:
Then I performed these commands:
Checking size now:
I suggest reopening the bug. It's either dd is not as effective, or the scripts are not working anymore.
Doing this for a new lubuntu box i'm creating reduced my size significantly:
drwxr-xr-x+ 1 rdempsey None 0 Jun 6 15:24 . d---------+ 1 rdempsey None 0 Jun 6 13:53 .. -rwxr-xr-x+ 1 rdempsey None 2.0G Jun 6 14:07 lubuntu-trustytahr-64.box -rwxr-xr-x+ 1 rdempsey None 1.1G Jun 6 15:27 package.box
everyone may wish to checkout opscode's bento project. It takes raw ISO from ubuntu, etc and smashes them into shape.
in particular the OS specific cleanup scripts, e.g.
and the common minimiser script
Other tricks for ubuntu...
to save a few more megabytes
In the line of other tricks for Ubuntu you can tell apt to not download translation indexes creating a file like
Then, remove the indexes lists before pack your machine.:
It will save you something around 70MB of space, which is quite relevant. You'll must do an
In a machine with 160MB (packaged) like the one I do and use as a base for another VMs it can be relevant. My dev machine has about 240MB (also packaged).