- Remove manuals
rm -rf /usr/share/doc
- Remove VirtualBox OSE
rm -rf /usr/src/vboxguest*
rm -rf /usr/src/virtualbox-ose-guest*
- Clean up the cache folder
find /var/cache -type f -exec rm -rf {} \;
- Remove unused locales
rm -rf /usr/share/locale/{af,am,ar,as,ast,az,bal,be,bg,bn,bn_IN,br,bs,byn,ca,cr,cs,csb,cy,da,de,de_AT,dz,el,en_AU,en_CA,eo,es,et,et_EE,eu,fa,fi,fo,fr,fur,ga,gez,gl,gu,haw,he,hi,hr,hu,hy,id,is,it,ja,ka,kk,km,kn,ko,kok,ku,ky,lg,lt,lv,mg,mi,mk,ml,mn,mr,ms,mt,nb,ne,nl,nn,no,nso,oc,or,pa,pl,ps,pt,pt_BR,qu,ro,ru,rw,si,sk,sl,so,sq,sr,sr*latin,sv,sw,ta,te,th,ti,tig,tk,tl,tr,tt,ur,urd,ve,vi,wa,wal,wo,xh,zh,zh_HK,zh_CN,zh_TW,zu}
init 1
mount -o remount,ro /dev/sda1
zerofree /dev/sda1
init 0
- Now you can compact the VM (.vdi files) with VBoxManage or just create the base box with vagrant