How to Check APFS Containers and Volumes in Terminal on a Mac

Illustration for How to Check APFS Containers and Volumes in Terminal on a Mac

Quick Answer

Open Terminal from Applications > Utilities, then run:

diskutil apfs list

This displays the APFS containers and volumes currently visible to macOS, including identifiers, capacity information, roles, and encryption status when available.

For a shorter overview of all connected storage devices, run:

diskutil list

These commands inspect storage only. They do not erase, partition, mount, or otherwise change your drives.

What APFS Containers and Volumes Mean

APFS, or Apple File System, organizes storage in layers:

  • A physical disk is the hardware device, such as an internal SSD or external drive.
  • An APFS container is a section of a physical disk that holds one or more APFS volumes.
  • An APFS volume is the usable file-system area where files and folders are stored.
  • A volume group can link related system and data volumes, particularly on a macOS startup disk.

APFS containers can share available free space among their volumes. That means a volume may not have a permanently fixed size in the same way a traditional partition does. Checking the container and its volumes together gives you a more accurate view of how an APFS disk is arranged.

These commands are useful when you need to identify an external drive, confirm whether a disk uses APFS, find a volume identifier, or investigate storage information before taking a later action.

Before You Begin

  1. Connect the external drive, if you are checking one.
  2. Wait for it to appear in Finder.
  3. Open Terminal from Applications > Utilities.
  4. If the disk contains important files, avoid using commands that erase, partition, or reformat it unless you have a current backup.

The inspection commands in this guide are read-only. They do not modify storage. However, identifying the correct disk before making changes is essential because disk commands can permanently erase data if used on the wrong device.

List Every Disk and Partition

Start with the general disk list:

diskutil list

This command asks macOS to show the physical disks and their partitions or containers. The output commonly includes:

  • A disk identifier, such as disk0
  • The disk’s partition scheme
  • The total size
  • An APFS container identifier
  • APFS volume identifiers inside that container
  • Volume names and file-system types

The identifier is important. It is the name macOS uses to refer to a disk, container, or volume in Terminal.

For example, an entry ending in s1 refers to a slice or partition associated with a disk identifier. Do not assume that disk0 is always the external drive. On many Macs, the internal startup storage is listed first, so verify the model, size, and volume name before doing anything else.

To see only APFS-related entries in the general list, you can use:

diskutil list | grep -i apfs

This filters the output to lines containing “APFS.” It does not change the disk list or modify any storage. Because filtering can hide surrounding context, use the complete diskutil list output when you need to understand the disk’s full layout.

Display APFS Containers and Volumes

Run this command for the most useful APFS-specific view:

diskutil apfs list

This displays APFS containers and the volumes inside them. Depending on the disk, the output may include:

  • The APFS container reference
  • The physical store associated with the container
  • Container capacity and free space
  • Encryption information
  • Volume names
  • Volume identifiers
  • Volume roles
  • Volume capacity or reserve information
  • Whether a volume is mounted

A physical store is the disk area that provides storage to an APFS container. A container can contain several volumes, and those volumes can use space from the same shared pool.

Terminal showing the command diskutil apfs list
Run this command in Terminal for this step.
diskutil apfs list

Read the output from the top down. First identify the container, then look beneath it for the volumes belonging to that container. If you are checking an external disk, compare the reported size and volume names with what you expect before continuing.

Inspect One APFS Container

If you know the container identifier, inspect it directly:

diskutil apfs list <container_identifier>

Replace <container_identifier> with the identifier shown by diskutil list or diskutil apfs list, such as the container identifier associated with the external drive.

This command narrows the report to one APFS container. It is useful when a Mac has several APFS containers and you want to avoid scanning unrelated startup or recovery information.

The command only reads information. There is nothing to reverse. If you are uncertain about the identifier, run the general commands again rather than guessing.

Inspect One APFS Volume

To inspect a specific volume, use:

diskutil apfs listVolume <volume_identifier>

Replace <volume_identifier> with the volume’s identifier. A volume identifier may look like diskXsY, but always copy the identifier reported on your Mac instead of assuming its number.

This command provides detailed information about one APFS volume, including its role, capacity details, encryption state when available, and related container information.

You can also ask diskutil for general information about a volume:

diskutil info <volume_identifier>

This is helpful for checking whether the volume is mounted, its mount point, its file-system personality, and other identification details.

Neither command changes the volume. They are safe inspection commands, and no recovery step is required.

Check Whether an APFS Volume Is Mounted

A mounted volume is available to macOS and normally appears in Finder. To check one volume, run:

diskutil info <volume_identifier> | grep -E "Device Identifier|Volume Name|Mounted|Mount Point|File System Personality"

This filters the report to several useful fields:

  • Device Identifier confirms which volume you inspected.
  • Volume Name shows its displayed name.
  • Mounted indicates whether macOS currently has it mounted.
  • Mount Point shows where it is available in the file system when mounted.
  • File System Personality identifies the file-system type reported by macOS.

The filter is only for readability. It does not alter the volume. If the filtered output omits information you need, run the unfiltered command:

diskutil info <volume_identifier>

Check APFS Space at the Volume Level

To see available and used space for a mounted volume, use the standard df command:

df -h <mount_point>

Replace <mount_point> with the path shown by diskutil info. The -h option presents sizes in a more readable format.

For example, if the mount point contains spaces, quote the path:

df -h "/Volumes/Your Volume Name"

This command reports space visible to the mounted file system. It is different from the container-level capacity information shown by diskutil apfs list. A container can have free space shared among several APFS volumes, while df focuses on the selected mounted volume.

For a broader check of available storage on a connected external drive, see How to Check Available Space on an External Drive in Terminal on a Mac.

Terminal showing the command diskutil list
Run this command in Terminal for this step.
df -h <mount_point>

Do not type the angle brackets. Replace the placeholder with the actual mount point from your Mac. This command is read-only and does not change storage.

Show APFS Volume Roles

APFS volumes can have different roles. A data volume stores user files, while system, recovery, preboot, and virtual-memory roles serve macOS functions. To review these roles, run:

diskutil apfs list

Look for the Role field under each volume. The role helps explain why several volumes may appear even when Finder shows only a small number of usable locations.

Do not delete an unfamiliar system-related volume just because its name or role is unclear. Some volumes support startup, recovery, security, or system operations. If your goal is simply to remove an external volume or change its format, first identify the physical disk and confirm that it is not the startup disk.

Save a Read-Only APFS Report

If you need to share the layout with technical support or compare it later, save the command’s output to a text file on your Desktop:

diskutil apfs list > ~/Desktop/apfs-report.txt

The > operator writes the command output to the specified file. It does not modify any disk, but it will replace an existing file with the same name. If you already have a file named apfs-report.txt on the Desktop, choose a different filename:

diskutil apfs list > ~/Desktop/apfs-report-2.txt

To view the saved report in Terminal, run:

cat ~/Desktop/apfs-report.txt

To remove the report afterward, use Finder or this command:

rm ~/Desktop/apfs-report.txt

The rm command deletes the report file, not the disk or APFS volume. Before running it, confirm that the path points only to the report you created. If you do not need the report, leaving it on the Desktop is also safe.

Terminal showing the command diskutil list
Run this command in Terminal for this step.
diskutil apfs list > ~/Desktop/apfs-report.txt

The saved report may contain disk names and storage details. Review it before sharing it with someone else.

Safely Inspect an External APFS Drive

For an external drive, use this sequence:

  1. Run the general disk list:

bash
diskutil list

  1. Identify the external disk by comparing its size, name, and partition layout with the drive you connected.
  2. Display APFS details:

bash
diskutil apfs list

  1. Inspect the relevant volume:

bash
diskutil info <volume_identifier>

  1. If you only needed to inspect the drive, leave it mounted or eject it normally from Finder.

If you are finished using the drive, eject it before disconnecting the cable. You can eject a specific disk with:

diskutil eject <disk_identifier>

Replace the placeholder with the external disk identifier, not a volume identifier, and verify it carefully first. Ejecting makes the disk unavailable to macOS and can help prevent file-system problems when you unplug it. It does not erase the disk. To use it again, reconnect it or mount it through Finder or Disk Utility.

For a Finder-based procedure, see How to Safely Eject an External Drive on a Mac.

Troubleshooting

diskutil apfs list does not show the drive

Check that the drive has power, is connected directly or through a working adapter, and appears in Finder or Disk Utility. Try reconnecting it, but eject it first if macOS recognizes it.

If the drive does not appear in diskutil list at all, the issue may involve the cable, enclosure, adapter, power supply, or drive hardware rather than APFS.

The drive appears, but no APFS container is listed

The drive may use another file system, such as exFAT, or it may contain an unsupported or damaged layout. Run:

diskutil info <disk_identifier>

This reports information about the selected disk or volume. Do not erase or reformat it merely because it is not APFS. Reformatting deletes existing data.

If you are deciding between APFS and exFAT for a drive, review APFS vs exFAT: Which Format Should You Use on a Mac?.

A volume is listed but not mounted

First inspect it:

diskutil info <volume_identifier>

If you have confirmed that it is the correct, non-startup volume, you can ask macOS to mount it:

diskutil mount <volume_identifier>

This changes the volume’s availability by mounting it, but it does not erase or reformat it. To reverse that action, unmount the same volume:

diskutil unmount <volume_identifier>

Before mounting or unmounting, close files and applications using the volume. Unmounting can make open files unavailable and may cause unsaved work to be lost.

The reported free space seems inconsistent

Compare the container report with the mounted-volume report. Run:

diskutil apfs list

Then check the mounted volume:

df -h <mount_point>

These commands measure different layers. Container-level space may be shared across multiple APFS volumes, while df reports space available to the selected mounted file system.

You are unsure which identifier to use

Run both of these commands and compare the disk name, size, and hierarchy:

diskutil list
diskutil apfs list

Do not run a command that changes storage until you can identify the correct physical disk and volume. When in doubt, stop and make a backup before proceeding.

Frequently Asked Questions

Does diskutil apfs list change anything?

No. It reports APFS containers and volumes without modifying them.

What is the difference between diskutil list and diskutil apfs list?

diskutil list provides a broad view of physical disks and partitions. diskutil apfs list focuses on APFS containers, their physical stores, and the volumes inside them.

Can I use these commands on an external APFS drive?

Yes. Connect the drive, confirm its identifier, and run the same read-only inspection commands. Always verify the disk’s name and size before using any command that changes state.

Why are there several APFS volumes on one Mac?

APFS can hold multiple volumes in one container. macOS may use separate volumes for system, data, recovery, startup support, and other functions.

Does checking APFS containers require administrator access?

Basic listing and information commands generally work as read-only inspections. macOS may request authorization for some operations that mount, unmount, repair, erase, or otherwise change a disk.

Final Thoughts

Use diskutil list to see the overall disk structure and diskutil apfs list to examine APFS containers and volumes in detail. When you need information about one item, follow up with diskutil info, diskutil apfs listVolume, or df -h. These commands let you investigate storage safely, provided you verify identifiers before running any command that changes a disk’s state.