APFS container

On this page 7

An APFS container is the top-level storage object of the Apple File System: a single disk partition formatted as APFS that acts as a shared pool of space for one or more APFS volumes. In macOS storage & backup, it explains why several volumes on one Mac drive can show the same free space and grow or shrink without repartitioning.

Instead of giving each volume a fixed size, as traditional partitions do, the container allocates blocks to volumes on demand. Disk Utility shows it as the parent item above the volumes, and the diskutil command names it with an identifier such as disk3, while the volumes inside appear as disk3s1, disk3s2 and so on.

How an APFS container shares space

An APFS container keeps a single space manager that tracks every free block in the partition. Each APFS volume inside the container has its own file system tree, metadata, encryption state and snapshots, but none has a predefined size; when a volume writes data, the container hands it blocks from the common pool, and when files are deleted the blocks return to the pool.

Because the volumes are separate file systems, they can have different roles and protections. Since macOS Catalina, the system installation is split into a read-only System volume and a writable Data volume, grouped as a volume group. Starting with macOS Big Sur, the System volume is additionally cryptographically sealed and booted from a snapshot. Both live in the same container and share its free space.

Two optional controls change the default pooling behavior. A reserve guarantees a minimum amount of space to one volume, and a quota caps how much a volume may consume. Without them, any volume can use all remaining space in the container.

ObjectWhat it representsTypical identifier
Physical diskThe SSD or hard drive with a GUID partition mapdisk0
APFS physical storeThe partition that holds the containerdisk0s2
APFS containerSynthesized disk that pools spacedisk3
APFS volumeFile system using space from the containerdisk3s1, disk3s5
APFS snapshotRead-only point-in-time image of a volumeNamed by date or update
Objects in the APFS storage hierarchy

Volumes inside a typical startup container

A Mac startup disk normally holds one container with several volumes, most of which are hidden in the Finder. Seeing them in Disk Utility, with View > Show All Devices enabled, often explains unexpected numbers such as large amounts of space attributed to System Data.

VolumePurposeWritable by the user
Macintosh HDSealed, read-only system filesNo
Macintosh HD – DataUser accounts, applications and settingsYes
PrebootBoot support files and FileVault dataNo
RecoverymacOS Recovery environmentNo
VMSwap files and sleep imageNo
Common volumes in the startup container of an Apple silicon Mac

Apple silicon Macs also keep separate system containers on the internal SSD, such as one for system firmware and one for fallback recovery. These are managed automatically and should not be erased or modified.

APFS container compared with partitions and volumes

The container concept sits between partitioning and the file system, so it is easily confused with both. The main difference is that a partition has a fixed boundary, while an APFS volume has a flexible size inside its container.

ConceptSize behaviorCreated withBest used for
PartitionFixed until resizedDisk Utility Partition, diskutil partitionDiskDifferent file systems or a separate OS
APFS containerFixed, equal to its partitionFormatting a partition as APFSHolding a pool of APFS volumes
APFS volumeGrows and shrinks in the poolAdd APFS Volume, diskutil apfs addVolumeSeparating data with shared space
HFS+ volumeFixed, equal to its partitionFormatting as Mac OS ExtendedOlder Macs and legacy compatibility
How the APFS container differs from neighboring concepts

A practical consequence is that adding a new APFS volume for testing a beta macOS release or separating project data does not require resizing anything. A new partition is needed only when a different file system, such as exFAT, or a fully independent container is required.

Working with containers in practice

Most container operations are done in Disk Utility or with diskutil apfs subcommands in Terminal. The command diskutil apfs list prints every container with its physical store, capacity, free space and the role of each volume, which is the most reliable overview available.

TaskRecommended actionCaution
Add a separate working areaAdd an APFS volume to the existing containerSet a quota if it must not fill the disk
Install a second macOS versionAdd a volume and install onto itBoth share space and the same firmware
Erase an external drive fullyErase the physical disk, not a single volumeErasing a volume leaves the container intact
Free space on a full diskDelete files and old local snapshotsDeleting a volume removes all its data
Shrink the container for another OSResize the container partitionRequires free space and a current backup
Common tasks and the right approach

For backups, Time Machine destinations formatted as APFS store their history as snapshots inside a dedicated volume. Removing that volume or its container deletes the entire backup history.

Limitations and common mistakes

  • Misreading free space: every volume reports the container’s free space, so values do not add up across volumes.
  • Erasing the wrong level in Disk Utility can delete all volumes in a container instead of one.
  • Assuming isolation of capacity: without quotas, one runaway volume can fill the disk for all others.
  • Using APFS on rotating drives works, but copy-on-write fragmentation can make hard disks slower than with HFS+.
  • Converting a container back to HFS+ is not possible in place; it requires erasing after a backup.

Corruption of the container’s metadata affects every volume at once. Separate volumes therefore protect against accidental mixing of data, not against disk failure, which still requires an independent backup.

Explained without jargon

An APFS container is like a shared warehouse on a Mac drive. Inside it are several storage rooms called volumes, but the rooms have no fixed walls. Each room simply takes as many shelves as it needs from the warehouse’s common supply.

That is why two volumes on the same drive can both say there are 200 GB free: it is the same free space, available to whichever room asks first. The warehouse size is fixed, while the rooms inside adjust automatically.

A typical use case

A developer with a 1 TB MacBook wants to test the next macOS beta without risking the daily work environment. Rather than splitting the drive into fixed partitions, the developer adds a new APFS volume called Beta to the existing startup container and sets a quota of 120 GB.

The beta installs onto that volume, and the developer chooses which system to start in the Startup Disk settings. When testing ends, deleting the Beta volume returns all of its space to the container immediately, with no repartitioning and no change to the main installation.