Originally Posted by sumguy
After transferring your stuff to your new computer, boot from the Mac OS install disk or USB stick (or recovery partition, but I find having a USB stick more convenient). Run Disk Utility, select the drive, go to the Erase tab, click Security Options, choose "write a single pass of zeros" (multiple passes are pointless). Then click Erase, and wait... Then re-install Mac OS X.
For an iPad, just go to Settings->General->Reset->Erase All Content and Settings.
Re Mac, since I'm currently running on a pre-Lion Mac, I thought I'd ask because most OS X Lion users won't own a OS X Lion USB stick and I wasn't sure if OS X Lion could be completely reinstalled directly from their recovery partition, or if any user data might end up in recovery partition.
Essentially in the past the way I'd clean old Mac and move to new Mac was: back up old Mac to external drive using Time Machine, startup from Mac OS installation disk (now it would be USB stick or recovery partition) and use disk utility to erase old Mac's internal drive (now not the entire drive but just the user partition if running disk utility from the recovery partition, and I agree single pass of zeros is sufficient) then reinstall the OS onto internal disk (now the user partition), startup from internal disk normally and create a demo account on old Mac if necessary, sell old Mac, buy new Mac, use Migration Assistant on new Mac to transfer stuff to new Mac from the Time Machine backup on the external drive.
Re iPad, I'd somehow missed seeing or forgot about that "Reset" menu way down at the bottom in Settings.