• First, I installed Windows 10 with Boot Camp, just to exchange data between macOS and Windows.
  • I created an ExFAT partition of 50 GB.
  • After sharing data, I decided to remove the extra partition and merge its space back to macOS.
  • First, I tried with the Disk Utility application. When I deleted it, its size become 272 GB, but I only assigned it 50 GB.
  • I erased it and selected APFS type, but it was not merging.
  • Next, I tried with the Terminal application. After deletion with diskutil commands, the partition became free space and only shows on the output from the command diskutil list.

I want to restore free space and assign it to macOS. (This free space is not visible in the Disk Utility application and the diskutil apfs resizeContainer disk0s2 0 command returns an error instead of working.)

Showing free space

Screenshot of partition information

How do I merge this free space to the macOS partition?

  • Since you have all that free space after Windows 10, you might consider using the free space to install Windows 11. Support of Windows 10 ends October 14, 2025 and currently upgrading is free. Apr 5 at 10:23

1 Answer 1


You need to move the free space to be immediately after the Apple_APFS container disk1 before using the command diskutil apfs resizeContainer disk0s2 0. The suggested steps are given below.

  1. Remove the remove the Microsoft Basic Data partition containing the OSXRESERVED volume. You volume should have been automatically removed after a successful Boot Camp install of Windows. The command for removal is given below.
    diskutil erasevolume free none disk0s3
  2. Move the Microsoft Basic Data partition containing the BOOTCAMP volume to the end of the drive. You could try either GParted or the MiniTool Partition Wizard. See this answer for more details.
  3. Enter the command below to reclaim the free space back to macOS.
    diskutil apfs resizeContainer disk0s2 0
  • Thanks a lot! by removing bootcamp from this device, restored all partition to Apple_APFS container ❤️
    – Rohit
    Apr 10 at 10:10

You must log in to answer this question.

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