Easy Step-by-Step Guide to Resize APFS Container on macOS High Sierra

With the release of macOS High Sierra, Apple introduced the Apple File System (APFS), which brought improved performance and better data integrity to Mac computers using SSDs. However, managing disk space within APFS containers can be a bit tricky for some users. Whether it’s creating more free space for another partition or resizing an existing one, understanding how to resize an APFS container is essential. This step-by-step guide will walk users through the process of resizing an APFS container safely and efficiently.

Understanding APFS Containers

Unlike traditional HFS+ partitions, APFS uses a container-based structure. Within a single physical partition (disk), a container is formed, and multiple volumes can reside within that container, dynamically sharing available storage. This makes volume management more flexible but also slightly more complex.

Prerequisites Before Resizing

  • Backup your data: Use Time Machine or another backup solution to prevent data loss.
  • Check current container layout and volumes: Run diskutil list in Terminal to view your storage configuration.
  • Ensure you’re running macOS High Sierra: This guide is tailored specifically for this version.

Step-by-Step Guide to Resize an APFS Container

Step 1: Open Terminal

Go to Applications > Utilities and open the Terminal app.

Step 2: Identify Your APFS Container and Volume

Use the following command:

diskutil list

Look for the section labeled APFS Container Scheme. Identify the container you want to resize (usually noted as diskX where X is a number).

Step 3: Resize the Volume Inside the Container

To shrink or enlarge a volume, use the command:

diskutil apfs resizeContainer diskX size

Replace diskX with your container identifier (e.g., disk1) and size with the desired new size. For example:

diskutil apfs resizeContainer disk1 100g

This resizes the container to 100 GB.

Step 4: Reallocate Free Space (Optional)

If you’ve freed up space and want to create a new container or partition, use Disk Utility or Terminal commands such as:

diskutil partitionDisk diskX GPT APFS NewVolume 50g

Step 5: Verify the Changes

Run diskutil list again to confirm that your APFS container and volumes have been resized properly.

Tips and Warnings

  • Not all volume resizing operations are non-destructive. Always backup your data before proceeding.
  • Resize operations may not work on fusion drives or non-SSD hardware in some cases.
  • Creating new partitions could potentially make your Mac unbootable if done incorrectly. Proceed with caution.

Conclusion

Resizing an APFS container in macOS High Sierra isn’t as intimidating as it might seem. With a bit of preparation and the right commands, users can manage their disk space efficiently. Whether it’s for performance optimization, installing a second OS, or simply better space allocation, mastering this task is a valuable skill for any Mac user.

Frequently Asked Questions (FAQ)

Q: Can I resize an APFS container without losing data?
A: Yes, as long as you follow the correct steps and resize existing containers carefully. However, always back up your data first, just in case.
Q: What if the resizeContainer command doesn’t work?
A: Ensure you’re using the correct disk identifier. Some drives, especially external or fusion drives, may not support all APFS features.
Q: Can I resize volumes inside the APFS container?
A: APFS volumes dynamically share the container’s storage space, so manual resizing is usually unnecessary unless creating or removing volumes.
Q: Is there a graphical way to do this instead of using Terminal?
A: Disk Utility offers some GUI capabilities, but for APFS containers, Terminal is typically more reliable and provides more control.

By following these steps and tips, users can better manage their APFS volumes and containers on macOS High Sierra, ensuring optimal system performance and space allocation.