Cannot delete/erase APFS volume.

I have a MacBook Pro (Retina, 15-inch, Mid 2015) running Mac OS Mojave. When I boot it up, it shows a grey screen with a question mark on a folder.


I have figured out that the issue is with the internal SSD as I can boot from a USB installer with Mojave just fine. I can see the internal disk with `diskutil` and also see `/Volumes/Macintosh\ HD/` from the terminal. I was able to recover the few files this way that I hadn't backed up earlier. However this was too slow as even an `ls` command on the Macintosh HD Volume takes a couple of minutes to execute and the `system.log` in `/var/log` shows loads of error messages of this type: `Kernel[0]: disk1: I/O error.` But, I managed to get the files I needed.


Now I want to wipe the SSD or atleast erase the data from the `/Volumes/Macintosh\ HD/`, but I am not able to do that. I tried Disk Utility but it just hangs every time I open it and running `diskutil` from the terminal on always ends up with some error. I have tried `verifyVolume`, `repairVolume`, `eraseVolume`, `deleteVolume`, `deleteContainer` and `eraseDisk` with `diskutil` but they all end with an error which looks something like this: `Error: -69877: Couldn't open device` or similar to this.


I found this answer here to delete the APFS partition using a bootable USB with Linux Mint. This ended with an error message too saying `Input/output error`.


Is there any way I can wipe the SSD clean?


The disk and the volume are not encrypted and I have also tried resetting NVRAM, PRAM and SMC but none of that helped. Booting up into Recovery Mode doesn't help either. It shows a spinning globe but there is no progress bar, and nothing happens.

Posted on May 10, 2021 5:27 AM

Reply

Similar questions

7 replies

May 11, 2021 10:20 AM in response to nivranshu26

Hmmm, mostly with SD Cards, but...


Best Answer

I have run across something similar before and what I did was issue the command:

diskutil unmountDisk /dev/diskxx

What you do when you shutdown and reboot, even in safe mode is you first unmount all your disks.


https://itectec.com/askdifferent/how-to-fix-error-69877-couldnt-open-device-after-interrupted-formatting-process/

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.

Cannot delete/erase APFS volume.

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