Skip to content

Instantly share code, notes, and snippets.

View simonwiles's full-sized avatar

Simon Wiles simonwiles

View GitHub Profile
kuznero /
Last active March 22, 2024 22:49
How to compact VirtualBox's VDI file size?

Source: StackOverflow

1. Run defrag in the guest (Windows only)

2. Nullify free space:

With a Linux Guest run this:

sudo dd if=/dev/zero | pv | sudo dd of=/bigemptyfile bs=4096k
sudo rm -rf /bigemptyfile