SecureErase (Category 4 - DoE 3 - Pass Secure Erase) Macintosh HD - in Terminal app

iMac -2012 - MacOS Catalina

I want to secure-erase my entire HD, not just the free space. The end goal is to sell my computer


I entered all of the required information into terminal to activate a category 4 secure erase.

After hitting the enter key, a line appears stating: "Ownership of the affected disk is required."


My question: What ownership information is required to activate the category 4 secure erase process?


------------------------------------------------------------------------------------------------------------

Below is a copy of all of the information displayed in the active Terminal window:

------------------------------------------------------------------------------------------------------------


Last login: Wed Oct 19 22:47:31 on ttys000

[—————— @ ———— iMac ~ % diskutil secureErase 4/Volumes/Macintosh\ HD]

Usage: diskutil secureErase [freespace] level

MountPoint | DiskIdentifier | DeviceNode

"Securely" (BUT SEE "man diskutil" FOR MODERN LIMITATIONS) erases either a

whole disk or a volume's freespace. Level should be one of the following:

0 — Single-pass zeros.

1 — Single-pass random numbers.

2 — US DoD 7-pass secure erase.

3 — Gutmann algorithm 35-pass secure erase.

4 — US DoE 3-pass secure erase.

Ownership of the affected disk is required.

Note: Level 2, 3, or 4 secure erases can take an extremely long time.

—————— @ ———— iMac ~ % []

iMac

Posted on Oct 19, 2022 11:41 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 23, 2022 6:27 PM

SteveHS wrote:

Thank you, John.

I tried your suggestion of adding the space after the number 4 : diskutil secureErase 4 /Volumes/Macintosh\ HD

That resulted in the following statement: "Could not find the disk hd".

I think you may have made a mistake typing the command by omitting the backslash after "Macintosh" in the path even though you are showing it in your post. The backslash is critical for the correct path in order to include the space in the path. Instead of using the backslash in the path to "escape" the space, you can include the path within double-quotes instead. Either of the two following commands are equivalent and should work:

diskutil  secureErase  4  /Volumes/Macintosh\ HD

diskutil  secureErase  4  "/Volumes/Macintosh HD"


(Please note - this procedure WAS NOT carried out in RECOVERY MODE)

Was it carried out while booted from a macOS USB installer? Or while the Mac was in Target Disk Mode connected to another Mac? Or an external full macOS boot drive? Otherwise, you cannot erase the drive you are booted from.


Similar questions

43 replies

Oct 23, 2022 4:27 PM in response to John Galt

FYI: When I entered this environment (Recovery Mode), I did not have the option to adjust the security level (akin to being grayed out). I had full control of my mouse, I simply could not adjust the slider control.


The more I progress, the more I seem to be encountering many 'blockades' not customarily seen or experienced by the average end-user or more experienced developers/programmers.

Oct 23, 2022 7:15 PM in response to HWTech

HWTech wrote:
Also, I'm a bit curious about why you did not have Filevault enabled on this system if data security is so important now when preparing the computer for sale?


This very good question was discussed / beaten to death a while ago: Secure Empty Trash missing on El Capitan - Apple Community.


People were shocked, amazed, distressed and dismayed that Apple so callously removed a feature that had always been little more than a placebo.


Data does not suddenly become sensitive the moment you decide to destroy it, it's sensitive from the moment it is created, before multiple redundant copies become created on local storage, and perhaps distributed to servers all over the world.

Oct 23, 2022 8:08 PM in response to HWTech

"HWTech: I'm a bit curious about why you did not have Filevault enabled on this system if data security is so important now when preparing the computer for sale."


That was a serious misstep on my part.

Fortunately, I managed to get through that ten-year stretch unscathed.


Regarding all of the information you provided - Thank you for your generosity and for sharing your wealth of knowledge.

I'm a big fan of learning by doing despite the outcome. This experience could not have happened without everyone's feedback/assistance.


At this point, I've got a few options that I can try and see where it leads me.

Oct 24, 2022 12:34 PM in response to BobHarris

Having provided all of the essential information about my system and situation, is it possible to reach a reasonable consensus regarding the best way to move forward.


Is simply re-installing MacOS Catalina (over-writing the current MacOS operating system) sufficient considering the fact this system is operating off of an SSD?


Additionally, will I have the option to select the operating system via an online connection or would it be easier to access MacOS Catalina from my USB device? Please note: I will require instructions on how to boot into a USB device assuming this is an easier, considerably less convoluted method.

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.

SecureErase (Category 4 - DoE 3 - Pass Secure Erase) Macintosh HD - in Terminal app

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