12

I need help to erase all of my data from my computer... Selling 2009 Macbook pro w. Lion. I don't have the startup disks.

So I've created another admin account and am trying to delete mine from there. But of course, it has been saying "deleting account" for hours.

Faster suggestions?

2
  • How securely do you want to delete the data? and is it on a SSD or hard disk?
    – mmmmmm
    Commented Mar 26, 2013 at 22:24
  • I don't really mind at this point! I just want to sell it and go! I will change my passwords.
    – apd
    Commented Mar 26, 2013 at 23:26

5 Answers 5

14

I don't know if I can necessarily help you out with the "fastest" way, but I think I can help with "best".

Most of your data will indeed be in your account, but there's also the chance that other personal items may be scattered about your hard drive. I would not personally sell a computer after just removing my own account, particularly if my account was not securely deleted, either by overwriting the unused disk space or by discarding the encryption key. (Of course, there's always the chance a computer could be lost or stolen, too, so I use FileVault 2 to encrypt my system's disk in case I'm not given the opportunity to securely erase it.)

You say you don't have a startup disk, but since you have Lion, you should be able to use OS X Recovery:

  1. Hold command-R on startup.

  2. Use Disk Utility to erase the disk securely using Security Options on the Erase tab.

  3. Start the installer to install a fresh copy of Lion. (This may involve downloading the installer from the Internet… note this can be a very large download. If you're feeling nice, you could take this opportunity to grab a copy of the installer for your MacBook's new owner.)

2
  • I actually let the admin erase to run for 7.5 hours and then force quit it. Upon restart it appears my admin user was erased, and I can't see any of my files visable on the computer, but all of the applications are still there. Applications that had my data saved (like Skype or Chrome) are fresh/new and no longer have my info. Is there anything else I should be concerned about?Thank you!!
    – apd
    Commented Mar 27, 2013 at 4:36
  • 1
    If you aborted the user account deletion (I'm assuming you used the "Erase home folder securely" option), then you may still have left some sensitive data behind that was formerly in your home folder. You can't see it using normal user methods, but data recovery tools could potentially still find it. And, of course, no home folder erasing will deal with data which may be on your system outside your home folder.
    – Mattie
    Commented Mar 27, 2013 at 12:41
6

If someone else has an SSD, the secure erase options are currently disabled for SSDs in Disk Utility. According to http://support.apple.com/kb/HT3680 erasing an SSD normally might be secure enough:

Note: With OS X Lion and an SSD drive, Secure Erase and Erasing Free Space are not available in Disk Utility. These options are not needed for an SSD drive because a standard erase makes it difficult to recover data from an SSD. For more security, consider turning on FileVault 2 encryption when you start using the SSD drive.

You can still run something like diskutil secureErase 4 disk0s2 in Terminal on the recovery partition. Simply enabling FileVault before erasing the drive or volume is probably a better option though. See this question.

2
  • 2
    Re secure erasing methods not being reliable—I'd say this is one more vote in favor of using FileVault 2. This is similar to what modern iOS devices do for a device erase: just lose the encryption key.
    – Mattie
    Commented Mar 27, 2013 at 19:18
  • Just to add, I did extra research in 2017 to see if macOS Disk Utility is capable of quickly and completely secure erasing an SSD. The answer appears to be yes. spin.atomicobject.com/2017/06/13/macos-disk-utility-erase-ssd
    – Mattie
    Commented Jan 16, 2020 at 15:21
3

I'll take a crack at "fastest":

(Note: This should go without saying, but make sure you read through this and understand it before you do anything.)

Assuming your original admin account was "joe" whose home was "/Users/joe"

1. Find User ID Number

ls -nld /Users/joe

drwxr-xr-x+ 65 501 20 2210 May 8 00:19 /Users/joe/

See that 501? That's your user ID number. It may be different, but it probably close to 501.

2. Delete your $HOME

Login as your 2nd admin user, and

sudo find /Users/joe -print -delete 

That will delete all of the files under /Users/joe.

There are other ways to do this, of course

sudo srm --simple --verbose --recursive /Users/joe 

Check man srm to see if you want to use --medium instead of --simple

3. Find Other Files

Then you might want to take a look for other files owned by joe. You can do this by username or user ID. I recommend ID, but that's probably because I'm an overly cautious fuddyduddy.

sudo find / -user 501 -print

replace '501' with whatever the number was above is Step #1

1

The quickest way to delete everything is to boot to the Recovery HD and terminal to drop a new empty filesystem on top of the existing one:

 diskutil reformat disk0s2

You might check that the device is correct by issuing diskutil list and making sure that Macintosh HD is actually disk0s2, but most people that have an alternate device layout know they do and can compensate. Note, this doesn't erase anything in terms of leaving all the files sitting on the drive. You would then want to consider if you wanted to zero the empty blocks, or do some more lengthy secure erases.

 diskutil secureErase 0 disk0s2 

The above command would zero out the entire volume and you can choose other levels such as:

            Level should be one of the following:
                  +   0 - Single-pass zero-fill erase.
                  +   1 - Single-pass random-fill erase.
                  +   2 - US DoD 7-pass secure erase.
                  +   3 - Gutmann algorithm 35-pass secure erase.
                  +   4 - US DoE algorithm 3-pass secure erase.

As mentioned in this other excellent answer, turning on FileVault is far more secure than any of these erase options for SSD and probably for HDD as well.

0

The best way to guarantee that all your personal data is removed is to write-zero the drive and then reinstall the OS, which requires the install discs.

As for the iTunes stuff, you'll want to make sure you have a backup of your iTunes library before you actually remove it. But you already have a backup, don't you? ;)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .