Whether you sell your Mac, give it away or put it out by the trash (not likely). You want to make sure that all data that is on the hard drive is in fact gone forever.

Most people will erase the hard drive, put a clean OS on it and figure it's ready to meet the next owner. Unfortunately there is nothing stopping the new owner from loading some data recovery software and browsing through all your private data that you thought was deleted.

Que? What? Yes, when you drag a file to the trash and empty it or even when you erase the entire hard drive you do not actually delete the files themselves but the directory entries for the files that were in the trash. Basically after emptying the trash the OS allows the space used by those deleted files to be used and overwritten. Until this happens... the files are still on your hard drive, just not visible.

There are tons of apps out there that will make sure once something is deleted, it is deleted beyond recovery but here is how to do it with Mac OS's Disk Utility.

1. Deleting data securely right away.
If you don't want to sell your Mac but still want to make sure data is deleted securely you have two options. 1. When something is in the trash instead of emptying it the usual way go to the Finder menu and choose "Secure Empty Trash". or 2. To make sure that files that have been deleted in the past stay gone open Disk Utility, select your hard drive (or partition), go to the erase tab and select "Erase Free Space". Both options will ensure that deleted data is unrecoverable.

2. Preparing for a new owner.
After you backed up all your data and/or transferred it to another Mac startup from the OS disc. Once booted select your language and in the next screen open Disk Utility from the Utilities menu. Now select your hard drive and go to the Erase tab. You will see a button "Security Options", click it and select "Zero Out Data". This will erase everything on your hard drive beyond recovery. This process will take up some time depending on the size of your hard drive and after it's done proceed to installing a clean OS on the drive. Now the Mac is ready for the next owner.

Additional options in Disk Utility for erasing data are "7-Pass Erase" and "35-Pass Erase". The choice to use any of these instead of the "Zero Out Data" is yours but the first option is good enough for most.