How to Manage an APFS Formatted Drive

Learn to format and create containers, plus more!

APFS (Apple File System) brings with it some new concepts for formatting and managing your Mac's drives. Chief 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.

In this guide, we teach you how to manage and alter APFS formatted drives through the use of Disk Utility. It is not intended as a general-purpose Disk Utility guide. If you need to work with HFS+ (Hierarchical File System Plus) formatted drives, learn how to use Disk Utility in macOS. It would also be a good idea to learn more about APFS and disk types.

Formatting a drive with APFS

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+. This may change in the future, but for now, 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 will be converted to APFS encrypted format. Be careful when doing this, as some apps and utilities such as Time Machine will not work with the APFS format.

With that list of don'ts out of the way, let's take a look at how to format a drive to use APFS.

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

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

  2. From the Disk Utility toolbar, select the view button, then select the option to Show All Devices.

    Disk Utility
  3. In the sidebar, select the drive you wish 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 will drop down allowing you to choose the type of format. Use the Format drop-down menu to select one of the available APFS formats.

    Formatting a drive with APFS
  6. Use the Format drop-down menu to select one of the available APFS formats.

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

  8. 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 on using the Create, Resize, and Delete Volumes instructions in this guide.

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

  10. A sheet will drop down displaying a progress bar. Once the formatting is complete, select Done. Notice in the sidebar that an APFS container and a volume have been created.

Converting an HFS+ Drive to APFS Without Losing Data

You can convert an existing volume to use the APFS format without losing information already present. We recommend that you have a backup of the data before converting. It is possible that if something goes wrong while converting to APFS you could lose the data.

  1. In the Disk Utility sidebar, select the HFS+ volume you wish to convert. Remember the volume is the last item in the drive's hierarchal tree.

    Disk Utility basic
  2. From the Edit menu select Convert to APFS.

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

Creating Containers for an APFS Formatted Drive

APFS brings a new concept to the format architecture of a drive. One of the many features 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 it was true that under certain conditions a volume could be resized without losing information, those conditions often did not apply to the volume you actually 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 worry about where the free space is physically stored—with one minor 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.

Of course, you can also pre-assign volume sizes and specify minimum or maximum volume sizes as well. We will cover how to set volume limits later when we discuss creating volumes.

Disk Utility being used to create additional APFS containers.

Create an APFS Container

Remember, Containers can only be created on APFS formatted drives if you need to change a drive's format, see the section Create an APFS Formatted Drive.

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

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

  3. Select the drive you wish to add a container too. In the sidebar, the physical drive occupies the top of the hierarchical tree. Below the drive, you will see containers and volumes listed (if present). Remember, an APFS formatted drive will already have at least one container. This process will add an additional container.

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

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

  6. The Partition map will appear displaying a pie chart of the current partitions. To add an additional container select the plus icon (+).

  7. You can now 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 as well as containers it can be a bit confusing. Remember 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.

    Disk Utility partition settings
  8. Make your choice, then select Apply.

  9. A drop-down sheet will appear 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.

Deleting a Container

Follow these steps to a delete a container.

  1. Follow steps 1 through 6 above.

  2. You will be presented with the selected drive's partition map. Select the partition/container you wish to remove. Remember any volumes within the container will also be deleted.

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

    Disk Utility partition settings
  4. A drop-down sheet will list what is about to happen. Select Partition if everything looks OK.

Create, Resize, and Delete 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.

Adding a volume to an APFS container.

Here's 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 would like to create a new volume within.

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

  3. A sheet will drop down letting you give the new volume a name and to specify the volume's format. Once you have a name and format selected, select Size Options.

    Disk Utility new volume
  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 is used to set the maximum size the volume is allowed to expand to. Both values are optional.

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

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

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

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

  8. A sheet will drop down warning you what is about to occur. Select Delete to continue the removal process.

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. Simply deleting data from one volume within a container will make that newly freed up space available to all volumes within.

At the moment there is no method available to change the reserve size or quota size options that are available when an APFS volume is originally created. It is likely the needed commands will be added to diskutil, the command line tool used with Terminal, at some point in a future macOS release.

Was this page helpful?