How To Securely Erase A Mac’s Hard Drive

Here are instructions on how to use Disk Utility to securely erase a hard drive connected internally or externally to your Mac. These instructions were written for Mac OS X 10.4 to 10.6. The process is very similar on older versions of Mac OS X but the screens will look a bit different.

Requirements – You’ll need either the Mac OS X install disk that came with your Mac or another OS X install disk that’ll boot your Mac, such as a retail copy of the Mac OS X 10.5 or 10.6 install disk.

I recommend securely erasing a hard drive before you recycle it or give it away. The instructions below include the option to re-install Mac OS X onto the hard drive at the end of the process.

If you’re securely erasing an external hard drive you do not need to use a Mac OS X install disk. Instead, you can simply open Disk Utility which you’ll find in the Utilities folder inside the Applications folder. In Disk Utility, select the external hard drive and then follow the last few steps of these instructions to erase it using one of the Security Options described below.

Background – Technically, it’s not possible to erase or remove data from hard drives. Thus “securely erasing” is a misnomer. Instead, what we’ll be doing is over-writing the data on your hard drive with gibberish, a random string of bits of data. When you securely erase your hard drive you’ll have a choice of how much over-writing you want to do. This process can take many hours if you select the 7-pass overwrite procedure. I recommend starting this process and then letting it run over-night.

  • Insert the Mac OS X install disc that came with your Mac.
  • Note: The disc will begin the process of installing Mac OS X on your Mac. Whether or not you actually choose to install Mac OS X is your choice, but if you do, you’ll do it AFTER you’ve securely erased your Mac’s hard drive.
  • Select your preferred language from the list presented.
  • When you see the welcome screen for the Mac OS X Installer, go to the menu named Utilities and select Disk Utility.
  • In the left pane of the Disk Utility window, click on the hard drive you want to erase.
  • In the right pane of the Disk Utility window, click the Erase tab.
  • Click the Security Options button.
  • I recommend that you select the 7-Pass Erase options, but you could choose the 35-Pass Erase option. Here’s my description of these options.

Don’t Erase Data— This option does not provide any security. This option only over-writes the directories on the hard drive. Your files could still be recovered.
Zero Out Data— Provides a pretty good level of security. All of your files are over-written with a string of zeroes. There are forensics utilities that in theory could retrieve some data.
7-Pass Erase— Provides a lot of security. This is considered sufficient by government standards to erase data from a disk. It writes a random string of ones and zeroes over your data files seven times. It may take several hours or more to complete this process.
35-Pass Erase— Provides the maximum amount of security offered. This option takes an extremely long time, possibly more than one day.

  • Click the radio button in front of 7-Pass Erase.
  • Click OK.
  • Click the Erase button next to the Security Options button.
  • Confirm you want to erase and the process will be begin.
  • If you want to install Mac OS X then go to the Disk Utility menu and select Quit after the erase is complete.
  • You’ll be taken back to the Mac OS X Installer welcome window. Click Continue.
  • Agree to the software license.
  • In the “Select a Destination” window click on the icon for the hard drive which you just erased and then click Continue.
  • Click the Install button to start the installation process. Depending upon the speed of your Mac and the version of Mac OS X which you are installing this process could commonly take anywhere from 20-60 minutes.

How to Create an Encrypted Disk Image

This post builds upon the information that I presented in my last blog entry about how to securely store personal information on your Mac. A disk image is a special kind of file. When a disk image file is opened, it makes the computer think that an actual disk, like a CD, has been physically inserted into the computer. Thus, a disk image file, or more simply a disk image, can be thought of as a virtual disk.

Here’s how to create and use a password-protected (encrypted) disk image in Mac OS X 10.4, 10.5 or 10.6:

1. Go to your Applications folder and open the Utilities folder.

2. Open the Disk Utility application.

3. Click the “New Image” button, or choose New > Blank Disk Image from the Disk Utility File menu.

• Enter a name for your disk image file in the “Save As” field

• Change the save destination to either your Documents folder or your Desktop, whichever you prefer.

• Set Volume Name set to “Virtual Disk” (In 10.6 the field is called “Name”, not “Volume Name”)

• Select a Volume Size for the image file. If you’re just going to store a few Word or Excel files in the disk image, then 10 or 20 MB should be large enough. (In OS X 10.6 40 MB is the smallest you can select.) You can choose any size you’d like by selecting “Custom” at the bottom. If you ever fill your disk image you can always create a larger one and move the files from the smaller disk image to the larger one.

• Leave the volume format set to “Mac OS X Extended (Journaled)” (In 10.6 the field is called “Format”, not “Volume Format”)

• Leave “Partitions” set to “No partition map”

• Leave the Image Format set to “read/write disk image”

• Set Encryption to “128-bit AES” if your Mac uses Mac OS X 10.4. Choose “256-bit AES” if your Mac uses Mac OS X 10.5 or 10.6

Warning: If you forget the password to your encrypted disk image, your data will be irretrievably lost so please write down your password on a piece of paper. This is just a precautionary measure.

• Click the Create button.

• Important: In this next step you’ll need to first uncheck “Remember password (add to keychain)” then enter the same strong password twice. This password is used to secure your disk image.  [By "strong password," I mean one this is long and contains a mix of letter, numbers, odd capitalization and punctuation marks or at least most of these features. For example, 1%milKisgooDforyoU is a strong password.]

• Click OK

4. The disk image file will be created and then it’ll be opened automatically.

5. Look at your Desktop you should see an icon named Virtual Disk. This is what appears whenever your disk image is opened. Copy a file into this Virtual Disk. Notice that the file will automatically be copied when you put it in the Virtual Disk. The original file will remain where it is so you’ll probably want to put it into the Trash in a couple of days after you’re sure you understand how your new disk image works.

6. Close Virtual Disk by dragging its icon to the Trash, which will eject this virtual or fake disk.

7. Now, locate your disk image file. (It’s in the location that you selected in step 3, second bullet). Double-click your disk image file. Enter your password when prompted and then click the “OK” button. You should now see the icon for Virtual Disk again. Open it and you’ll see the file that you copied into it.

8. Now that you know how to use your disk image, you can copy more files into it and then delete the originals. For example, if you keep a list of passwords or other sensitive information in a Word or Excel file, copy this file into the secure disk image. Once you’ve confirmed that this file is inside your disk image then throw away the original file so it’s no longer sitting unprotected on your Mac’s hard drive.

9. Don’t leave your Virtual Disk on the Desktop all day long. This defeats the added security. Only open it when you need it and then close it when you’re done by dragging its icon to the Trash icon on your Dock.

How can I securely store passwords on my Mac?

Do you have personal or sensitive information about yourself or your clients on your Mac? Things such as credit card numbers or passwords? If so, I recommend storing this information in a special kind of file known as an encrypted disk image. I store a list of my own passwords and other sensitive information in such a file on my Mac laptop. This file is always readily available while still being inaccessible by others, even if my laptop were stolen.

Without getting very technical, disk images were invented as a way to make a backup copy of a disk such as a floppy or CD, but other uses have emerged over time. Mac OS X lets you create a blank disk image that can be thought of as an empty folder. Additionally, this file can be encrypted which requires a password when you open it. Thus, in an over-simplified way, you can think of an encrypted disk image as a password-protected folder.

Read my next blog post for step-by-step instructions on how to create and use an encrypted disk image on your Mac. After creating your own secure disk image, copy the files that you want to protect into this disk image. For example, if you keep a list of passwords or other sensitive information in a Word or Excel file, copy this file into the secure disk image. Once you’ve confirmed that this file is inside your disk image, then throw away the original file so it’s no longer sitting unprotected on your Mac’s hard drive.