2

My MacBook keeps telling me I have to quit applications because there is not enough free memory.

I went into diskutil and this is how my hard drive(s) are broken down.

diskutil

Can anyone help?

I also tried opening Terminal and using the following script

sudo diskutil apfs resizeContainer disk0s2 0

But I got the following error message:

Error: -69519: The target disk is too small for this operation, or a gap is required in your partition map which is missing or too small, which is often caused by an attempt to grow a partition beyond the beginning of another partition or beyond the end of partition map usable space

2 Answers 2

1

I have to quit applications because there is not enough free memory

Free memory is not hard disk space, but rather RAM. You can resolve this by quitting apps that are using lots of memory. You can find which processes are using memory in Activity Monitor.


If you're still interested in making more disk space for other reasons…

a gap is required in your partition map which is missing or too small

This is the actual error. diskutil list shows an APFS container disk0s2 of 70 GB, and a HFS partition disk0s3 of 180 GB.

70 GB + 180 GB = 250 GB, which is the total size of your disk — there's no free space gap to resize your container into, it's as big as it can be.

You can remove your HFS partition disk0s3 (back up your data first), then expand your APFS container into the gap created by that operation.

2
  • Thank you so much for the answer. Yes, I am not very computer savy. I meant disk space not RAM. I have read your answer several times and I understand part of it. Please walk me through how to remove my HFS partition (disk0s3) and then expand my APFS container. Thank you again.
    – Jordan S
    Dec 10, 2020 at 15:25
  • More specifically, the partition you were trying to resize has another one ‘sitting next to it’ on both sides, so there’s no room to spread out. If your row in a stadium is full, it doesn’t really you help if there are thousands of free seats in another section. Dec 10, 2020 at 16:38
1

You’ll need to remove your HFS+ partition (disk0s3) in order to expand your APFS container (disk0s2), since the APFS partition is constrained on both sides.

The method to do so will depend on how full the HFS partition is.


Easiest solution:

  1. copy any data off of your HFS+ partition to an external hard drive
  2. delete the HFS+ partition
  3. enlarge your APFS container (disk0s2) as desired, then enlarge the APFS data volume as required - (be sure to leave at least enough free space at the end of the disk for the next step)
  4. create a new HFS+ partition in any space that now remains, if desired, and copy back the data you removed in step one

If you don’t have an external drive handy, and the HFS+ partition is less than half-full:

  1. Shrink the HFS+ partition as much as Disk Utility will allow (but don’t make it smaller than the amount of space you want to add to the APFS container)
  2. Create a second HFS+ partition in the newly free space at the end of the disk.
  3. Copy all files you wish to keep from the first HFS+ partition to the second (new) HFS+ partition. You can do this in the Finder, via the command line, or with a tool such as Carbon Copy Cloner or SuperDuper!
  4. Delete the original HFS+ partition and rename the remaining HFS+ partition as desired. Now your disk will have a block of free space between the APFS container and the HFS+ partition
  5. Use Disk Utility (or terminal commands) to increase the size of the APFS container (disk0s2) and then the APFS volume (“Macintosh HD - Data”, I presume, in your case) as needed.

Note to others:

There is another time you will get “insufficient space” errors when trying to modify or add partitions: often on external USB hard drives that still have their factory formatting, the EFI partition is either missing or too small for macOS.

Microsoft recommends it be at least 100 MB, but macOS requires a larger size (200 MB, I believe).

You must log in to answer this question.

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