Skip to main content

Understanding Free Space on APFS Volumes

What

This article explains howwhy free space is calculated on APFS volumes andcan howlook it differsdifferent from traditionalfree space on older file systems likesuch as HFS+.

When/Why

UnderstandingAPFS free free-space onvalues APFScan volumesmove isaround essentialbecause macOS accounts for managingsnapshots, clones, sparse files, and shared container space. That matters when you are checking whether a Mac has enough usable storage onfor macOSupdates, devices,deployments, asor it helps users and administrators make informed decisions about disk usage and maintenance.troubleshooting.

How

  1. Traditional file systems (such as HFS+): Calculating freeFree space onis HFS+usually volumescalculated involvesby subtracting the total occupied storage blocks from the total volume capacity.

  2. Snapshots: APFS snapshots complicatecan freehold spaceblocks calculationsthat aslook theydeleted dynamicallyfrom occupythe storagelive blocks.file system. Deleting snapshotsa cansnapshot may free up space, but the amount depends on what other snapshots andstill their deletion.reference.

  3. Clones: ClonedAPFS cloned files in APFS initiallycan share storage blocks,blocks butat asfirst. theirAs datathe diverges,files change, they consumeuse additional space. Finder reportsmay clonedshow the files asseparately separate entities, butwhile APFS still accounts for the shared storage blocks.

  4. Sparse files: TheseSparse files containreserve littlea logical size that can be much larger than the data relativethey tocurrently their overall size.store. Copying or saving sparse filesthem without preserving theirthe sparse format causescan expand them to expand totheir full size, consuming more space.size.

  5. Other volumes: APFS containers share free space among their volumes, unlike HFS+across volumes. macOS decides how much space volumes such as Data and VM volumes,use ininside particular,that shareshared free space, with macOS determining the VM volume's usage.container.

  6. Free Free-space control:estimates: APFS and macOS control free space, with figuresreport changing depending on snapshots, clones, sparse files, and VM volume usage. APFS provides estimates for "importantavailable usage"space, andincluding "opportunisticspace usage"that freecan space.be reclaimed from snapshots or other system-managed storage.

TheBecause impactAPFS can reuse, share, or reclaim blocks, a single free-space number may not tell the whole story. Check the context before assuming a Mac is out of these factors on APFS free space calculationsor makesbefore itusing challengingFinder-reported tovalues preciselyas determinethe availableonly storage. It's crucial for users and administrators to understand these complexities to effectively manage storage and device performance. By being awaresource of snapshots,truth.

clones,

For sparsea files,second andopinion, sharedsee volumes,the usersrelated links below. The linked diskspace tool can makehelp morereturn informedAPFS-aware decisions regarding storage allocation and maintenance, ensuring optimal device performance and efficient use of resources.

There is also an open-source tool that can aid in seeing more accurate free available-space informationvalues linkedfrom tothe below.command line.

  1. Free space on an APFS volume is an illusion – The Eclectic Light Company
  2. GitHub - scriptingosx/diskspace: macOS command line tool to return the available disk space on APFS volumes