dd (free) method: Also works on any Unix-based operating system
After jailbreaking your iPad 2 and installing Cydia, you can install an OpenSSH server (included in the Cydia/Telesphoreo repository) on your iPad.
The OpenSSH server should start upon installation. Get your iPad's IP address by going to the Settings app, pressing "Wi-Fi", clicking the blue arrow by the network you're currently connected to, and looking at "IP Address".
You'll need a Unix-like terminal next. (On Windows, you can use PuTTY.)
Run this command in your terminal:
You'll be prompted for a password. By default, it is
alpine. Type that in and press Enter.
You should have authenticated. This command will change your current working directory to the mounted "user partition",
Now you can begin wiping the free space with
dd if=/dev/zero of=nothing.dat
This process may take a long time, and
dd does not have a progress bar. Make sure your iPad is plugged in while this wipe takes place.
dd will output a brief transfer statistic upon completion (or error, but there shouldn't be any errors). Now, your free space is completely used up by a file called
nothing.dat. Remove it to reclaim the free space:
There you have it. The free space of the user partition has now been wiped with zeros!
Alternate (non-free) method:
After jailbreaking your iPad 2 and installing Cydia, you can use Cydia to purchase ($2.99) iWipe from the Cydia/Telesphoreo repository. Here is the description for iWipe (retrieved 05 June 2012 for version 1.0-1):
Want to make sure a deleted confidential email or embarrassing photo is purged forever from your iPhone? Simply deleting a file doesn't guarantee it's gone for good, and doing a restore only quick-formats the iPhone. Protect your deleted data from being recovered by hacking tools and prying eyes, or in the event your iPhone is stolen.
iWipe is a simple utility for zeroing out the free space on your iPhone. The tool does not delete any live files, but uses the same method that Mac OS X uses to zero free space: it creates a large temporary file, which writes zeroes over the free space where deleted files can still reside. The entire iPhone user partition is cleansed, forever purging deleted photos, email, voicemail, and other deleted files.
This helpful utility can be run periodically to effortlessly clear out old data and ensure it is beyond recovery. Because it doesn't erase your content or settings, you won't need to recovery any backups or risk losing data. Actual erase time varies depending on the amount of free space on the device. You're still able to lock or receive phone calls while iWipe is running.