Secure Erase with diskutil crashes consistently with OS High Sierra 10.13.6

I am trying to securely erase unused space on my iMac's internal hard disk under OS 10.13.6, using the Terminal. Over several attempts, some using freespace setting 0 and some 1, my computer hangs up when between 71% and 84% of the free space has been erased (see screen grab attached); this usually leads to a major crash in which either I must do a brutal restart by unplugging the power cable, or else (when left to run overnight) the computer crashes and goes to a black screen, necessitating a restart.


The reason I am using the Terminal rather than simply going through Disk Utility's Erase function is that the relevant button is greyed out. Any suggestions? I have already run Disk Utility's repair function.


iMac 27″, macOS 10.13

Posted on Aug 29, 2024 12:18 AM

Reply

Similar questions

12 replies

Aug 30, 2024 9:29 AM in response to Antifon

Does your iMac use a Fusion Drive?


If you are only erasing the Free space, then it seems you are trying to preserve the OS? Why? Just create a bootable macOS USB installer so you can perform the secure erase of the Hard Drive (do not secure erase the SSD if a Fusion Drive since a simple erase of an SSD is enough to destroy all data with TRIM enabled).


If you are already booted to the macOS installer (Internet Recovery Mode or USB), then it may indicate a failing hard drive.


Edit: If you are selling this iMac, then here is an Apple article with instructions for properly preparing the Mac for sale:

What to do before you sell, give away, trade in, or recycle your Mac - Apple Support


Aug 30, 2024 8:01 PM in response to Antifon

"Secure Erase" doesn't actually accomplish anything useful. You know that, right?


From High Sierra's very own manpages,


      NOTE: This kind of secure erase is no longer considered safe
        because modern devices have wear-leveling, block-sparing, and
        possibly-persistent cache hardware. The modern solution for
        quickly and securely erasing your data is strong encryption,
        with which mere destruction of the key more or less instantly
        renders your data irretrievable in practical terms.

Aug 31, 2024 12:16 AM in response to BDAqua

Thanks for your help, BDA. After booting in Restore Mode and going to Disk Utility, I got the following results:

First, the Erase button was not greyed out; but I was not given the option of erasing free space, only of erasing the entire disk (see screen grab 1).


Next I ran FirstAid; but this stopped with message "There is not enough free space in this Core Storage Logical Volume..." (see screen grab 2). Note that the hard drive has about 407 GB free space. Now I'm more concerned about this issue!


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.

Secure Erase with diskutil crashes consistently with OS High Sierra 10.13.6

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