I’ve deleted my Macintosh HD partition and don't know what to do, because the free space isn't showing up in the graphic interface of diskutil.


1 Answer 1


I did manage to format it via the command diskutil addPartition disk0s1 %Apple_APFS% %noformat% 0 (even though I had disk0s1 and I needed to create a partition under that section, it understood what I wanted to do and created for me disk0s2) and I did manage to get my Macintosh HD back.

As I didn’t find anything useful for this situation on the web, I wanted to share my little experience here :)

  • After entering the command given in your answer, did you need to use the Disk Utility to erase disk0s2 using the name Macintosh HD and format APFS? Or, maybe you did something else? Commented Dec 16, 2023 at 22:36
  • Yes after adding the partition you need to rename it if you want or just you can type name after %noformat% you can see it here
    – namra
    Commented Dec 17, 2023 at 11:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .