Erasing a FileVault 2-encrypted Volume
On occasion, it’s necessary to erase a FileVault 2-encrypted volume. However, Disk Utility won’t let you erase or repartition until you unlock or decrypt.
This can be an issue for a malfunctioning FileVault 2-encrypted volume that will not let you either unlock or decrypt. To help with this, the diskutil tool provides a way to quickly delete CoreStorage volumes. This includes the ability to erase encrypted CoreStorage volumes (aka FileVault 2-encrypted volumes) without first decrypting or unlocking them.
To do this, first run the following command:
diskutil cs list
This will give you with a list of the CoreStorage volumes on your system. Unless you have a Fusion drive or multiple encrypted drives, your FileVault 2-encrypted drive should be the only one listed.
In the listing, you will want to select and copy the Logical Volume Group (LVG) alphanumeric UUID for your CoreStorage volume. The LVG should be the first UUID listed and it’s the one we want to delete.
Next, run the following command:
diskutil cs delete UUID_here
This will delete your CoreStorage volume and reformat it as an unencrypted HFS+ volume.
Great article Richard.
Would this have any detrimental effect on the drive by “erasing the core storage” vs actually decrypting and formatting?
Lee,
CoreStorage volumes are built by software, so there shouldn’t be any detrimental physical effects to the hard drive.
In terms of where CoreStorage “lives”, it’s a layer above the disk partitioning, but below the file system used by a particular partition.
Hi!
Thank you for the information, but it hasn’t help.
The terminal says: Error: -69691: Couldn’t eject disk
On Mac OS mavericks.
Can you help please?
Hi Cheval,
I had the same eject problem.
Try booting in recovery mode (reboot your mac and press and hold “alt”, when you hear the sound and select the recovery partition)
There you can use diskutility and erase the encrypted partition with it.
P.S. If you don’t have the recovery partition installed, you can load the recovery system directly from Apple by pressing “Cmd+R” instead of “alt”.
Good luck
Fabian
Hello,
Don’t forget to use sudo
Fabian, ingenious! Rebooting with ‘alt’ worked – then selecting ‘recovery partition’, not my usual HD, then disk utility. I had this problem three times with encrypted time machine disks that became full. They asked for the password but rejected the correct one! Repair ‘not possible’. Formatting did not work (in disk utility or terminal). Deleting the volume group did not work. – Also, this ‘feels’ a lot safer, since I can use disk utility and don’t worry about deleting something I don’t want to delete.
Thanks,
Hi Vincent, I have the same problem. This is the second time god my timemachine (encrypted) HDD full and it rejects my password.
I can’t format, delete, nothing.
Did you solve this problem in anyway ?
Thank you.
It’s kind of crazy that you can just delete the contents of the drive with that command, without any confirmation step or password.
I think setting a firmware password would prevent things like this being done accidentally.
Don’t know what I would have done without this. Keep up the good work!!
You are amazing! Thank you. I just moved to a mac and upgraded to OS 10.10 and all hell broke loose. The machine created partition after partition due to bootcamp errors and Yosemite upgrade. And the ice on the cake was my 3TB fusion drive was missing 804GB allocated and hidden from me. Of course coming from windows, live is not as simple as cmd, at least not yet.
I stupidly reformatted the HDD thinking it would make a difference, and that I would get a chance to redeem myself and merge the drives again, but I was so wrong. After a full day of work, and some searching, I landed on this page…Life Changing. Fixed my problem.
Thank you from all the newbs to OSX and Terminal.
Thanks for the help. I had the same problem and followed instructions but now i have 2 seperated drives (i had a fusion drive) one for the ssd and the other for the regular hd. They used to be one as a fusion drive. How to combine them again?
You can’t do this on a fusion drive. This is only used for non-fusion drive setups.
Thank you so much Richard,
I was almost going crazy with that partition hidden/crashed by filevault. Apple support couldn’t help me, no German board could, but you did!
Thanks again & kindest regards from Germany
Chris
I do not have enough words for how helpful this was for me. It has been a problem for days, with visits to dozens of websites, and over an hour on the phone with a senior tech guy at OWC. Thank you, thank you!
Rich, I’ve noticed that this procedure also deletes the Recovery Partition.
Is there any way around that?
Works perfectly thanks
Thank you very much. This is very helpful.
thanks for the great procedure. I just bought my macbook pro retina and also activated filevault. The next day I tried to restore my system using Time Machine but it all screwed up because the drive got locked and no way to unlock it. I called Apple and they tranferred me to higher support level and finally told me to go to Apple store for repair. I couldn’t wait so I searched on google and found this procedure. I finally deleted the drive using the diskutil command like you said and successfully reinstall the OSX. thanks so much. Filevault sucks! it’s recommended not to use filevault disk encryption.
Worked brilliantly. Thank you!
Thank you so much! I was this close to giving up on that drive when it started going back because of a FileVault error. At first it asked for the password, which I had, but it wouldn’t stop accessing the disk. Discovered that somehow FileVault encryption had been “paused” and it was just kind of hanging there. Your workaround enabled me to wipe it and start over. This time I won’t be enabling FV. Thank you!!!!
I have a separate, but related, question Suppose you have an external HD you need to send back to the manufacturer for replacement. If the drive is encrypted, from a security viewpoint, is there any need to erase it? I.e., does encryption obviate the need to erase, at least when it comes to protecting your personal info.?
Works very great
thx…works great…..
Thank you
Started CoreStorage operation
Ejecting Logical Volumes
The volume “Macintosh HD” on disk1 couldn’t be unmounted
Error: -69888: Couldn’t unmount disk
Saved the day! I booted into the Recovery partition, followed the above, and now I’m waiting for the download of OS. Totally worth the wait. Nothing as frustrating as FileVault.
Thanks for the post!
i get the message ownership of the affected disk is required
Thank you! I’m trying quite desperately to erase a filevault encrypted SD card without success.
$ sudo diskutil cs delete LVG_ID_HERE
Password:
Started CoreStorage operation
Unmounting Logical Volumes
Ejecting Logical Volumes
Destroying Logical Volume Group
Erasing disk3s2
Initialized /dev/rdisk3s2 as a 118 GB case-insensitive HFS Plus volume with a 16384k journal
Mounting disk
Could not mount disk3s2 with name (null) after erase
Finished CoreStorage operation
any idea?
running El Capital 10.11.6
Mee too .. same problem
Awesome! Worked on the first try!!!! Thanks so much for this simple and straightforward explanation!
This was a lifesaver for me. On a newly formatted encrypted volume, the disk utility app detected errors and reported that it “cannot be repaired” and would fail when trying to erase. This allowed me to delete it completely and get it working again. Thank you!
it erased the entire mac i just wanted to get filevault off that is it.
Hi I have an older Mac running an old operating system and I’ve lost my recovery key. I was curious on how to run the command for diskutil cs list. I know this is an old post but would greatly appreciate the help
error message “does not appear tp be a valid core storage logical volume group uuid or name
can anyone help please
instead of UUID_here, you have to copy the Logical volume group ID
works perfectly, thanks for the info
Just wanted to say THANK YOU. This saved my old trusty 2011 MacBook Air from a certain death.