Table of Contents

Zero-Fill Disk Drive Free Space

There may be various reasons to zero-fill the free space on a disk drive:

Do not do this on SSD drives!
This may cause a thinly provisioned virtual disk to balloon out to it's fully provisioned size! But it can also have a profound impact in the size of VM (image) backups.

Windows

https://docs.microsoft.com/en-us/sysinternals/downloads/sdelete

sdelete -z x:

:!: sdelete can also be used for secure erase.

Linux

https://community.linuxmint.com/software/view/zerofree

https://snippets.khromov.se/shrinking-a-virtualbox-linux-image-with-zerofree/

zerofree /dev/sdx1