# Compact FreeBSD VPS image



## Paul-LKW (Aug 9, 2013)

Hi all,

I find a problem in the FreeBSD VPS image, that is in the guest system I use

`df -h`

I see it just used 4.9 GB and in the host system I see the image used nearly 8 GB, I want to ask does anyone know FreeBSD has tools like "Windows" side sdelete.exe could make deleted space free, then I could perform compact command from the Host system to reduce the image side.

Best Regards,
Paul.LKW


----------



## Paul-LKW (Aug 11, 2013)

OK, I finally found out what I am seeking for, it should be using dd to zero the space: `dd if=/dev/zero of=/dev/sda`. Full details could be found out from the URL: http://blog.markloiseau.com/2010/10/how-to-compact-a-virtualbox-ubuntu-guests-vdi-file/


----------

