I cannot erase external drive with Apple Disk Utility

Hi. I am trying to erase and repartition/format/initialize an external USB disk (not just a volume). Apple DiskUtility simply doesn't react if I click erase.


Using diskutil in the Terminal, I get this information:


/dev/disk4 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *4.0 TB     disk4
   1:                        EFI ⁨EFI⁩                     209.7 MB   disk4s1
   2:                 Apple_APFS ⁨Container disk5⁩         1.0 TB     disk4s2
   3:                  Apple_HFS ⁨LaCieRugged⁩             1.0 TB     disk4s3
   4:                  Apple_HFS ⁨LaCieRugged⁩             2.0 TB     disk4s4

/dev/disk5 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +ERROR      disk5
                                 Physical Store disk4s2

(base) Martins-MBSG:~ mritter$ diskutil eraseDisk JHFS+ TT disk5
You cannot manually format an existing APFS Container disk

(base) Martins-MBSG:~ mritter$ diskutil eraseDisk JHFS+ TT disk4
Unable to begin erase operation: This operation is restricted by Sandbox; check your settings in System Preferences > Security & Privacy > Privacy > Files and Folders (-69464)


Any idea what I could do?

Thanks!

Posted on Jun 17, 2022 12:46 PM

Reply
Question marked as Top-ranking reply

Posted on Jun 18, 2022 1:52 AM

Thank you @P. Phillips and @HWTech!

Adding the Terminal.app (or Disk Utility.app) to "Full Disk Access" solved the problem. However, it remains a mystery to me, why the DiskUtility App doesn't have Full Disk Access by default.

Similar questions

7 replies

Jun 17, 2022 5:05 PM in response to eques

@P. Phillips has the correct answer.


I just want to comment on how you used the command line to attempt to erase the physical drives. The first command referenced "disk5" which is a virtual (aka synthesized) volume created from the hidden Container on the physical drive identified as "disk4" (or the hidden Container "disk4s2" specifically).


You may need to give the Terminal app "Full Disk Access" which may be why the "eraseDisk" command for "disk4" failed which was sort of mentioned in the error message.


Jun 18, 2022 2:11 AM in response to eques

Because the Terminal Application is totally unforgiving. One small colon or bracket in the work direction and once the command is excited - there are not " Do-Overs " - period .


In the wrong hands, it can render the Operating System compromised or worse still not functional at all.


Sorry, you were talking about Disk Utilities and mistook it to be Terminal - my bad.

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.

I cannot erase external drive with Apple Disk Utility

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