APFS.UTIL(8) System Manager's Manual APFS.UTIL(8)

apfs.utilAPFS file system utility

apfs.util -A get path

apfs.util -A set=yes/no path

apfs.util -C -type type path

apfs.util -D get device

apfs.util -D set=yes/no device

apfs.util -E path

apfs.util -G path

apfs.util -h

apfs.util -k device

apfs.util -m <verb> path

apfs.util -M dir

apfs.util -O path fs_name

apfs.util -p device removable writable

apfs.util -P verb1 verb2 path

apfs.util -r path

apfs.util -R SNAPSHOT device

apfs.util -s device

apfs.util -S dir

apfs.util -t

apfs.util -y path

apfs.util -Y dir

apfs.util -z path

apfs.util -Z path

The apfs.util command supports getting and setting various file system options.

path argument is a path to any file within the mounted file system. If it is used to specify a volume, any file within the same volume will get the same result. device argument is the /dev/diskXsY identifier corresponding to the volume. dir could be any directory in the mounted file system.


get path
get atime update setting for volume specified by path.
set=yes/no path
enable or disable update setting for volume specified by path.
-type type path
clear the purgeability of files of the specified type on the volume referred to by path.
type could be one of: photo, music, mail, document, data, podcast, video, movie, message, book.
get device
Get defragmentation setting for volume or container specied by device.
set=yes/no device
enable / disable defragmentation for volume or container specified by device.
drop the extents for path from the first snapshot
get stats on the purgeable files on the volume specified by path.
Return the UUID of the apfs volume on device.
verb path
mark the file at path as purgeable with the various options specified.
verb could be one or more of: -low -med -high -photo -music -mail -document -data -podcast -video -movie -message -book -fault -clear
flag the named directory as "maintain-dir-stats".
path fs_name
override the fstypename for apfs to be fs_name or "hfs" if the optional fs_name was not given.
Return the apfs volume name of device.
criteria path
purge files meeting the criteria specified on the volume referred to by path.
criteria could be -low -med -high
and/or with specified parameters: -minsize VAL -maxage VAL -maxage AGE_IN_SECONDS -total TOTAL_PURGE_AMOUNT
and/or specified by: -type type, that could be one of -photo -music -mail -document -data -podcast -video -movie -message -book
(and optionally, -typetotal TYPE_PURGE_AMOUNT)
set the sync-root flag on the specified dir directory.
set the volume specified by device to revert to the snapshot named by SNAPSHOT on next mount.
Set container UUID and its volume(s) UUID(s) to new random values. device must be an identifier of a container.
get the directory stats from dir. path.
stitches and creates synthetic objects on root volume group
get the sync-root flag from the first parent that has one for the item identified by path.
get the sync-root flag from the specified directory in dir.
make the file at path exempt from copy-on-write semantics for snapshots
get the purgeable file flags for the specific file at path.


The apfs.util utility first appeared in OS X 10.12.

May 2, 2023 macOS 14.3