How can I really wipe an external hard drive

Hi all,


For years I've wiped external hard drives (before trashing them) using the disk utility and clicking on "Security Options" to get a 3-, 5-, or 7-pass erase. That option is now gone, and I need to get rid of another external hard drive (Western Digital -- I've done this many times in the past). How can I do it now (in a way that doesn't involve a hammer or a drill)?


Thanks.

Posted on Jun 18, 2025 8:55 AM

Reply
Question marked as Top-ranking reply

Posted on Jun 20, 2025 10:45 AM

If you have an older Intel Mac from 2007 to 2015 (non-USB-C), or access to a Windows PC, then you can create & use a bootable ShredOS USB stick to overwrite the whole Hard Drive. To allow ShredOS to boot on many current Windows PCs you may need to temporarily disable Secure Boot since I'm doubtful the ShredOS USB stick supports a PC configured with Secure Boot enabled.


Otherwise you would need to find a third party app for macOS which can securely erase the external Hard Drive (no idea or suggestions since I've never needed one), or use the command line as suggest by @Urguhart1244. Here are the instructions for using the command line to write zeroes to the drive.


First you must get the device identifier for the external Hard Drive you wish to securely wipe. You can get the device identifier by using Disk Utility. The device identifier is in the form of "diskX" where "X" is a number. You need to retrieve the device identifier just before using the Terminal commands since the device identifier can change each time you connect the drive or restart the computer. Using the wrong device identifier will cause you to erase an unintended drive instead.


Once you have the correct device identifier for the Hard Drive you wish to erase, you can use the following Terminal commands:


Unmount all volumes on the selected drive with device identifier "diskX" (replace "diskX" with the correct device identifier for your Hard Drive):

diskutil  unmountDisk  diskX


This command will write zeroes to the whole physical drive which has the device identifier "diskX" (again replace "diskX" with the correct device identifier):

sudo  dd  if=/dev/zero  of=/dev/diskX   bs=10m


This second command will prompt you for your admin password. Nothing will appear on the screen as you type the password. Press the "Return" key to submit the password. This second command is the one which will overwrite the drive so make sure you have selected the correct device identifier. I highly recommend you first disconnect all other external drives to minimize the chances of a catastrophic mistake.


Unfortunately this command will not show the progress. It can take days or even a week or more depending on the size, speed, and health of the Hard Drive you are erasing. You must not let the Mac sleep or power down, or disconnect the drive during this procedure or you will have to start over. Technically if you have the location of the last write to the drive, it may possible to give that as an option to this command (unless this version of the utility is too old to support that option). I've never had to try restarting in the middle of an erase.


14 replies
Question marked as Top-ranking reply

Jun 20, 2025 10:45 AM in response to MarkPek

If you have an older Intel Mac from 2007 to 2015 (non-USB-C), or access to a Windows PC, then you can create & use a bootable ShredOS USB stick to overwrite the whole Hard Drive. To allow ShredOS to boot on many current Windows PCs you may need to temporarily disable Secure Boot since I'm doubtful the ShredOS USB stick supports a PC configured with Secure Boot enabled.


Otherwise you would need to find a third party app for macOS which can securely erase the external Hard Drive (no idea or suggestions since I've never needed one), or use the command line as suggest by @Urguhart1244. Here are the instructions for using the command line to write zeroes to the drive.


First you must get the device identifier for the external Hard Drive you wish to securely wipe. You can get the device identifier by using Disk Utility. The device identifier is in the form of "diskX" where "X" is a number. You need to retrieve the device identifier just before using the Terminal commands since the device identifier can change each time you connect the drive or restart the computer. Using the wrong device identifier will cause you to erase an unintended drive instead.


Once you have the correct device identifier for the Hard Drive you wish to erase, you can use the following Terminal commands:


Unmount all volumes on the selected drive with device identifier "diskX" (replace "diskX" with the correct device identifier for your Hard Drive):

diskutil  unmountDisk  diskX


This command will write zeroes to the whole physical drive which has the device identifier "diskX" (again replace "diskX" with the correct device identifier):

sudo  dd  if=/dev/zero  of=/dev/diskX   bs=10m


This second command will prompt you for your admin password. Nothing will appear on the screen as you type the password. Press the "Return" key to submit the password. This second command is the one which will overwrite the drive so make sure you have selected the correct device identifier. I highly recommend you first disconnect all other external drives to minimize the chances of a catastrophic mistake.


Unfortunately this command will not show the progress. It can take days or even a week or more depending on the size, speed, and health of the Hard Drive you are erasing. You must not let the Mac sleep or power down, or disconnect the drive during this procedure or you will have to start over. Technically if you have the location of the last write to the drive, it may possible to give that as an option to this command (unless this version of the utility is too old to support that option). I've never had to try restarting in the middle of an erase.


Jun 18, 2025 3:23 PM in response to MarkPek

For a rotating magnetic drive, Erase simply overwrites the directory area, leaving the data block intact and in the same order. There used to be utilities to try to go out and harvest that stuff.


But ONE pass of overwriting will suffice for everything short of Military secrets.


As Urquhart1244 shows above, the (Security Options) button in current versions of Disk Utility has a slider control for that. Default is overwrite directory only, then overwrite data once, and then more and more passes can be added. In general, more than one pass overwrite just takes WAY longer for no added benefit.

Jun 20, 2025 11:46 AM in response to HWTech

A slightly different option using Terminal is to use all low-level diskutil commands:


get the disk-number for the DEVICE: NB> disk-numbers can vary restart-to-restart, so be sure to do all this in the SAME session


diskutil list   

^-- then note carefully the diskX designation of the physical DEVICE you wish to operate on. There are NO safeguards.


diskutil unmountDisk diskX

^-- same as HWTech suggestion


diskutil zeroDisk [force] diskX

^-- brackets around [force] indicate the word force is optional, the brackets are NOT included.

Jun 18, 2025 9:46 AM in response to MarkPek

  • SSD (or NAND), or HDD with rotating platters?
  • Is the disk formatted as APFS or HSF+, exFAT, or other? Was it formatted using Apple tools, or managed by some third party (WD) app?

SSD has no need for multi-pass erase (no magnetic trace).

Encrypted drives of any type and file system can also do with a single erase, or just ‘tossing’ the encryption keys.

Disk Utility would only show Security Options (2,3,7-pass) for erasing when applicable/​appropriate.

Make sure that the disk isn’t in use by any app for any document on that drive/​disk/​partition, else Erase may not be available.

For disks that were set up using WD software, I would advise to use the same WD software to erase (securely). [There is good reason to re-format new disks with Disk Utility, so to not be reliant on third party software after a few years.]


What is the version macOS on which you are trying to do this? Find out which macOS your Mac is using - Apple Support


Jun 18, 2025 10:57 AM in response to MarkPek

If you still don’t get the security options that you expect, then you may be able to get it by formatting as something else (e.g. exFAT), then formatting again as something else again (e.g. APFS). That has helped me in the past for a “stubborn” disk.


Else there are Terminal commands to write all 0s to an entire disk, but I don’t know enough about that to endorse that or guide you through that. Maybe someone else will chime in. Disk Utility seems more user-friendly.

Jun 19, 2025 10:40 AM in response to MarkPek

in Disk Utility, you generally need to use the Tiny "View" menu to "Show all Devices" before you can see and manipulate all substructure AND the Physical Volume. you want to select the Physical Volume, by its immutable manufacturer-given name.


this "Show all devices" from High Sierra:



contrast with "Show only Volumes", so that you don't injure yourself:


Jun 18, 2025 10:26 AM in response to Urquhart1244

Thanks. It's an HDD. It was formatted using Apple tools and was probably (?) APFS. It wasn't set up using WD software. It *might* have been encrypted, which *might* explain why the "erase" took about 2 seconds. Still I guess I'm not confident taking this drive to the dump. Isn't there a way in Disk Utility or otherwise to write over the disk a few times or whatever?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I really wipe an external hard drive

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.