My 2007 Macbook Pro has suffered from a failure of its GPU and will now only boot in Single User mode.

I want to sell it on eBay for spares, but obviously I don't want a hard drive with live data on it ending up on eBay.

I know you can destroy a drive's contents with a secure erase in Disk Utility, but as I said, I can't boot into any mode that requires graphics because the GPU is dead.

How do I secure erase the machine's drive in Single User mode?

  • 1
    If you're selling for spares, you could sell sans-HDD (which won't effect it's value much, as it's a four year old used HDD) and not need to worry about it? Commented Dec 31, 2011 at 14:36
  • 1
    That thought had occurred, but it's one of those pre-unibody machines that are not exactly easy to get into. I'd prefer avoiding that if I can.
    – GordonM
    Commented Jan 1, 2012 at 12:58

4 Answers 4


Normally from the command line, you would use the diskutil command with the zeroDisk, randomDisk or secureErase options to securely wipe a disk. However, I would imagine this doesn't work on the disk you've just booted from. So I suspect you'll either have to find another Mac and connect yours in target disk mode via a Firewire cable, or physically remove the drive and connect it to another Mac using a disk caddy, to wipe it the way you wish.


It should be possible to boot an external drive (including the installation DVD) in single user mode:

Hold Option as you turn the power on, select the DVD/HDD with the arrow keys then press and hold Command+S+Return, holding them down until you see the now-familiar-for-you console boot: at which point it would be possible to use a whole disk shredder as mentioned by scottishwildcat.

  • Thanks, I've searched a way to boot from different partition in single user / safe mode. Actually, there is no need to hold Return key, just press it once.
    – zxcat
    Commented Aug 18, 2016 at 12:30

Had the same task. And finally I've found the way to do it without other mac.

  1. Boot in single user mode from external hdd / recovery. (see @Ryccardo answer). Note: you can't erase partition you booted from.
  2. Create new partition in place of one you want to erase: newfs_hfs -J 0 /dev/diskXsY Make sure to change X & Y in diskXsY to proper values.
    Note: create with journal (-J option) to override previous journal, which can make impossible to mount partition in single user mode.
  3. Mount created partition.
  4. Fill partition with (random) data. The easiest way is to create large file(s) to occupy all space. You can use openssl rand or dd of=… bs=… count=… as described in answers of this question.
  5. Optional: securely remove created file(s) with srm.

Note: maybe this method will not fully erase data such as previous files' names / dir structures, if such data stored in some system areas of fs. I'm not sure, because I don't know how HFS+ stored. But in my case it's not a problem.


If you want to completely wipe it, I'd think you could type this in single-user mode, hitting return after each "-----": /sbin/mount -uw / ----- rm -rf *

  • 1
    Once you have unmounted /, where exactly would the binary for rm come from?
    – nohillside
    Commented Apr 27, 2013 at 4:17
  • @patrix: his reasoning is actually sound (mount -uw means remount while making writable and the command is obviously loaded in RAM before it starts acting), but apart from not being a secure erasing tool (at least with the supplied command line) -- what if it fails? How would you repeat it?
    – Ryccardo
    Commented Apr 27, 2013 at 17:49

You must log in to answer this question.

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