Skip to content

MediaKit reports not enough space on device for requested operation: what it actually wants

The MediaKit error appears when partitioning or erasing a drive that has plenty of free space. It is about layout, not free space. How to get past it.

5 min read

Disk Utility says MediaKit reports not enough space on device for requested operation, usually with (-5341) after it, while the drive has hundreds of gigabytes free. The message is misleading. It is not about free space inside the volume. It is about room in the drive's partition map, the table at the very start and end of the disk.

Why it happens

  • You selected a volume, not the drive. Erasing a volume keeps the old partition map. If that map is an old Master Boot Record layout, or was made by another computer, it may have no room for what macOS wants to write.
  • The drive is in MBR format and you asked for GUID or APFS. macOS wants a small EFI partition at the start, and an MBR drive often has no gap for it.
  • You are adding a partition next to an APFS container that already fills the drive. APFS shares free space between volumes, so the space you see is not unallocated on the disk.

The fix that almost always works

Erase the whole device, not the volume. This removes everything on the drive, so copy off anything you want first.

  1. In Disk Utility, choose View, Show All Devices.
  2. Select the top line for the drive, the one with the manufacturer's name, not the indented volume.
  3. Click Erase. Choose GUID Partition Map as the scheme and APFS or exFAT as the format.
  4. If it still fails, use Terminal, which writes a fresh map without asking Disk Utility's questions.
diskutil list external
# replace disk4 with YOUR drive. Check twice: this erases it.
diskutil eraseDisk APFS "Backup" GPT disk4

If you wanted a second volume, not a partition

On an APFS drive you rarely need a partition. Add a volume instead (the + button in Disk Utility's toolbar). Volumes share the drive's free space and never hit this error. Our partitioning guide covers when a real partition is worth it.

The cousin: the target disk is too small

The target disk is too small for this operation (-69519) appears when restoring or cloning one disk onto another. It means what it says: the destination is smaller than the source's partition, even if the files would fit. Shrink the source container first, or copy files rather than cloning the disk.

Common questions

Why does MediaKit say not enough space when my drive is empty?

Because it refers to the partition map, not free space in a volume. An old MBR layout or a selected volume rather than the whole drive leaves no room for the layout macOS wants. Erasing the whole device with GUID Partition Map fixes it.

How do I fix error -5341 in Disk Utility?

Choose View, Show All Devices, select the drive itself rather than its volume, and erase it with GUID Partition Map. This deletes everything on the drive, so copy files off first.

What does the target disk is too small for this operation mean?

It appears when cloning or restoring one disk onto another whose partition is smaller than the source. Copy the files instead, or shrink the source first.

Read next