Although we assign 40/50gb hdd space to VM, not all of it is used.
After using VM for sometime, you may find vdi is constantly increasing & may need to shrink it.
To Shrink vdi size.
dd if=/dev/zero of=/testfile rm -rf /testfile
You can download sdelete from
Run following command to shrink image
VBoxManage modifyvdi hdd.vdi --compact
VBoxManage.exe modifyvdi hdd.vdi --compact
if you find any missing point in here, please let us know in comment section or tweet us at @linuxreaders. To get more articles like this, subscribe to our RSS feeds / Mails.