I like the zerofree utility that clears the unallocated blocks in a ext2/ext3/ext4 filesystem.
Take a look at the code snipplet
First go to single user
# init 1
Then do the magic
# for i in `mount | grep sda | grep ext | cut -b 9` ; do mount -o remount,ro /dev/sda$i && zerofree -v /dev/sda$i && mount -o remount,rw /dev/sda$i ; done ;
And here is a sample on a VirtualBox VM
--
= ^ . ^ =