sudo apt install zerofree
boot into emergency mode with GRUB by pressing 'e' and appending the line beginning with 'linux' with the text
systemd.unit=emergency.target
F10 to boot. Log in as root and then run:
mount -o remount,ro / #makes the partition read-only, which zerofree requires
Then run:
zerofree -v /dev/sda1 #(or whatever you want to target)
Exit. Shutdown the VM and open a terminal in the host OS.
$ vboxmanage list hdds #see all virtual disks and identify the one you want $ vboxmanage modifymedium disk ./VirtualBox/MyDebian/MyDebian.vdi --compact #substituting the path for the disk you want to target
Done.
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).