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
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBzScPbbWpHi5qwAtPiCqCNjfhP4-kCArqfztlBU68WIvgxf8OAJCp8ASMv1bjiiRGgnTXzYBAIwS2xSF7JLXvme5orZZ2JBRCykbYMluX4nhcW6vCoL8At2T1LMI6a4HLEYtSnQczJLc/s400/Screenshot.png)
--
= ^ . ^ =