How to Manage an APFS Formatted Drive

Learn to format and create containers

APFS (Apple File System) brings new concepts for formatting and managing your Mac's drives. Among these is working with containers that can dynamically share free space with any volumes contained within them.

To get the most out of the new file system, learn how to format drives with APFS; create, resize, and delete containers; and create APFS volumes that have no size specified using Disk Utility.

For additional information on Disk Utility or if you need to work with HFS+ (Hierarchical File System Plus) formatted drives, learn how to use Disk Utility in macOS. It is also a good idea to learn more about APFS and disk types.

Information in this article applies to macOS Catalina (10.15) through macOS High Sierra (10.13).

Format a Drive With APFS

Using APFS as a disk format has a few restrictions you should be aware of:

  • Time Machine drives must be formatted as HFS+. Do not format or convert a Time Machine drive to APFS.
  • Apple does not recommend using APFS on standard rotational hard drives. APFS is best used on solid-state drives.
  • If you encrypt a drive using macOS High Sierra or later, the drive is converted to APFS encrypted format. Be careful when doing this, as some apps and utilities such as Time Machine do not work with the APFS format.

Formatting a drive will result in the loss of all data contained on the disk. Be sure you have a current backup.

Here's a look at how to format a drive to use APFS.

  1. Launch Disk Utility, located in /Applications/Utilities/.

  2. From the Disk Utility toolbar, select the View button and choose Show All Devices.

    Disk Utility with Show All Devices selected
  3. In the sidebar, select the drive you want to format with APFS. The sidebar shows all drives, containers, and volumes. The drive is the first entry at the top of each hierarchal tree.

  4. In the Disk Utility toolbar, select Erase.

  5. A sheet drops down where you choose the type of format. Use the Format drop-down menu to select one of the available APFS formats.

  6. Select GUID Partition Map as the formatting Scheme to use. You can select other schemes for use with Windows or older Macs.

  7. Provide a name. The name will be used for the single volume that is always created when formatting a drive. You can add additional volumes or delete this volume later using the Create, Resize, and Delete Volumes instructions in this guide.

  8. When you have made your choices, select Erase.

    Formatting a drive with APFS using Disk Utility
  9. A sheet drops down and displays a progress bar. When the formatting is complete, select Done. The sidebar shows that an APFS container and a volume have been created.

Convert an HFS+ Drive to APFS Without Losing Data

You can convert an existing volume to use the APFS format without losing information already present. Make a backup of your data. If something goes wrong while converting to APFS, you could lose the data.

  1. In the Disk Utility sidebar, select the HFS+ volume you want to convert. The volume is the last item in the drive's hierarchical tree.

    Disk Utility with a volume selected
  2. From the Edit menu, select Convert to APFS.

  3. A sheet displays a warning that you are about to change the format and that the change to APFS can't be undone without losing data. If this is OK, select Convert.

Create Containers for an APFS Formatted Drive

APFS brings a new concept to the format architecture of a drive. One feature included in APFS is its ability to change the size of a volume dynamically to meet the user's needs.

With the older HFS+ file system, you formatted a drive into one or more volumes. Each volume had a set size determined at the time of its creation. While, under certain conditions, a volume could be resized without losing information, those conditions often did not apply to the volume you needed to enlarge.

APFS does away with most of those old resizing restrictions by allowing volumes to acquire any of the unused space available on an APFS formatted drive. The shared unused space can be assigned to any volume where it is needed without worrying about where the free space is physically stored—with one exception. The volumes and any free space must be within the same container.

Apple calls this feature Space Sharing. It allows multiple volumes, regardless of the file system they may be using, to share the available free space within the container.

You can also pre-assign volume sizes and specify minimum or maximum volume sizes as well.

Create an APFS Container

Containers can only be created on APFS formatted drives. Here's how:

  1. Launch Disk Utility located in /Applications/Utilities/.

  2. In the Disk Utility window that opens, select View and then select Show All Devices from the drop-down list. The Disk Utility sidebar changes to show physical drives, containers, and volumes. The default for Disk Utility is to show volumes in the sidebar.

  3. Select the drive you want to add a container to. In the sidebar, the physical drive occupies the top of the hierarchical tree. Below the drive, you see containers and volumes listed (if present). An APFS formatted drive has at least one container. This process adds an additional container.

  4. With the drive selected, choose Partition from the Disk Utility toolbar.

  5. A sheet drops down asking if you want to add a volume to the current container or partition the device. Select Partition.

    Disk Utility showing the Partition option
  6. The partition map appears, displaying a pie chart of the current partitions. To add an additional container, select the plus icon (+).

  7. Give the new container a name, select a format, and give the container a size. Because Disk Utility uses the same partition map interface for creating volumes and containers, it can be confusing. The name will apply to a volume that is automatically created within the new container. The format type refers to the volume, and the size you select will be the size of the new container.

  8. Make your choices and select Apply.

    Disk Utility partition settings
  9. A drop-down sheet appears listing the changes that will occur. If it looks OK, select Partition.

At this point, you have created a new container that includes a single volume taking up most of the space within. You can now use the Create Volumes section to modify, add, or remove volumes within a container.

Delete a Container

Follow these steps to delete a container.

  1. Follow steps 1 through 5 in the Create an APFS Container section above to display the partition map.

  2. Select the partition or container you want to remove. Any volumes in the container will also be deleted.

  3. Select the minus icon (-) and then select Apply.

  4. A drop-down sheet lists what is about to happen. Select Partition if everything looks OK.

Create, Delete, and Resize Volumes

Containers share their space with one or more volumes contained within. When you create, resize, or delete a volume, it is always referenced to a specific container.

How to Create a Volume

  1. With Disk Utility open (Follow steps 1 through 3 of Creating Containers for an APFS Formatted Drive), select from the sidebar the container you want to create a new volume in.

  2. From the Disk Utility toolbar, select Add Volume or Add APFS Volume from the Edit menu.

  3. A sheet drops down where you give the new volume a name and specify the volume's format. After you have a name and format selected, select Size Options.

    Size Options screen in Disk Utility
  4. Size options allow you to set a reserve Size. This is the minimum size the volume will have. Enter the Reserve Size. The Quota Size sets the maximum size the volume is allowed to expand to. Both values are optional.

    If no reserve size is set, the volume is only as large as the amount of data it contains. If no quota size is set, the volume size limit is based on the container size and the amount of space taken up by other volumes in the same container. The free space in a container is shared by all volumes.

  5. Make your choices and select OK. Then, select Add.

How to Remove a Volume

  1. Select the volume you wish to remove from the Disk Utility sidebar.

  2. From the Disk Utility toolbar, select the minus icon (-) or choose Delete APFS Volume from the Edit menu.

  3. A sheet drops down, warning you about what is about to occur. Select Delete to continue the removal process.

Resizing Is Unnecessary

Because any free space within a container is automatically shared with all APFS volumes within the container, there is no need to force the resizing of a volume as was done with HFS+ volumes. Deleting data from one volume within a container makes that newly freed up space available to all volumes.

Was this page helpful?