First of all, zero the space in the guest. You can do that easily with secure-delete. In the Ubuntu guest, this srm command will recursively delete all files and folders, quickly, verbosely, zero the old file and will only do it with one pass.
sudo apt-get install secure-delete
sudo srm -r -f -v -z -l -l /dir/to/clean/*
Next, simply vMotion the VM to another datastore with the thin option set. If that’s not an option for you, you’ll need to power off the VM.
<Power off the VM>
vmkfstools --punchzero vmdk-to-shrink.vmdk