I tried to make a partition and then tried to undo it. Now, I don't know how to get the missing disk space back.

As you can tell, I have 751.28 GB disk. Macintosh HD and Recovery HD have 557.4 GB. About 180 GB are missing. Where did it go? How do I figure out where it went? Most importantly, how do I fix it?

I ran

diskutil list

and it showed

    0:      GUID_partition_scheme                        *751.3 GB disk0
    1:                        EFI EFI                     209.7 MB   disk0s1
    2:                  Apple_HFS Macintosh HD            556.7 GB   disk0s2
    3:                 Apple_Boot                         650.0 MB   disk0s3
    4:                 Linux Swap                         16.4 GB    disk0s4

enter image description here


I ran

   sudo gpt -r show /dev/disk0

Output is:

     start        size  index  contents
         0           1         PMBR
         1           1         Pri GPT header
         2          32         Pri GPT table
        34           6         
        40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
    409640  1087392760      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
1087802400     1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
1089071936   344263872         
1433335808    32049152      4  GPT part - 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F
1465384960     1954819         
1467339779          32         Sec GPT table
1467339811           1         Sec GPT header

2 Answers 2


Booted to Internet Recovery Mode you have to remove the swap partition and then resize your main volume.


  • Backup your main volume
  • Restart to Internet Recovery Mode by pressing alt cmd R at startup.

    The prerequisites are the latest firmware update installed, either ethernet or WLAN (WPA/WPA2) and a router with DHCP activated.
    On a 50 Mbps-line it takes about 4 min (presenting a small animated globe) to boot into a recovery netboot image which usually is loaded from an Apple/Akamai server.

    I recommend ethernet because it's more reliable. If you are restricted to WIFI and the boot process fails, just restart your Mac until you succeed booting.

    Alternatively you may start from a bootable installer thumb drive (preferably Yosemite or El Capitan) or a thumb drive containing a full system (preferably Yosemite or El Capitan). If you boot to a full system and login as admin you have to prepend sudo to execute some commands like gpt ... or newfs_hfs ...!

Remove the Linux Swap partition

  • Open in the menubar Utlities->Terminal
  • Enter diskutil list and gpt -r show /dev/disk0 to get an overview
  • Remove the Linux partition:

    diskutil umountDisk /dev/disk0
    gpt remove -i 4 /dev/disk0 

Restore the original size of your main volume

  • Resize your main volume:

    diskutil resizeVolume /dev/disk0s2 750g #or 100%

    this should also move your Recovery HD to the end of the disk.

  • verify the volume with diskutil verifyVolume disk0s2
  • reboot to your main disk

First of all i would use a gparted livecd/usbstick to find and destroy the missing partition, after deleting the misscreated partition i would left the space unformatted. Since you are using El Capitan the system is probably using core storage it is preferable to resize the Macintosh HD volume with diskutil from your mac recovery partition or a Mac OS X installation usb stick . Using the terminal run

diskutil cs resizeStack /dev/disk0s2 736G

*dont forget to modify the disk identifier an the volume size accordingly to your setup.

If the volume is not core storage i would still use gparted live to destroy the faulty partition and use one of the those options

  • Directly grow the mac Macintosh HD using gparted
  • Boot on the recovery partition and resize the Macintosh HD using disk utility
  • Thanks. But what does "dont forget to modify the disk identifier an the volume size accordingly to your setup" mean?
    – lars
    Jan 24, 2016 at 0:49
  • Using the informations from the screenshot the volume to be resized would be /dev/disk0s2 but that does not mean it is going to be the same when booting from a other drive it could be disk3s2 or something else you can find the right one with diskutil list as for the space it is Macintosh HD + free space . i belive that if you are not setting any size is going to fill the free space
    – starsky_70
    Jan 24, 2016 at 1:01
  • This will definitely not work because it's no corestorage volume
    – klanomath
    Jan 24, 2016 at 1:01

You must log in to answer this question.

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