Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 6b0af3a

Browse files
committed
Zero out empty space in the disk image
1 parent 2ccad4c commit 6b0af3a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Vagrantfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,14 @@ Vagrant.configure("2") do |config|
5454
5555
rm -rf /usr/obj /usr/ports /usr/src /usr/tests /usr/lib/debug /var/db
5656
57+
# Adapted from bento's minimize.sh. This writes zeroes to the disk so that the empty space is
58+
# easily compressed.
59+
dd if=/dev/zero of=/EMPTY bs=1M
60+
rm -f /EMPTY
61+
sync
62+
5763
df -h
5864
du -hs /home/vagrant
59-
6065
du -ah / | sort -r -h | head -25
6166
SHELL
6267

0 commit comments

Comments
 (0)