If you are the one who tries to partition APFS container on macOS High Sierra without a sign of success, this reply may help. Seeing the error code 49168 is a common deal, and most of the users manage to solve it. First of all, forget doing it from Disk Utility. Newbies may risk trying to partition the container in the Terminal app. Make sure to migrate to APFS initially.
Ways to Fix APFS Container Resize Errors
Start with backing up the data not to lose an important piece. Then, switch off automatic backups by Time Machine:
- Launch System Preferences.
- Choose Time Machine.
- Remove the checkmark from Backup Automatically.
The next thing a user should do is play with the Terminal window.
Detect Where APFS Partition Is Located
Perhaps, soon it will work within the graphical Disk Utility, but now one has to use Terminal to find out the location of APFS partition.
- Launch Terminal. It is located in Utilities in the Applications folder.
- Enter the offered command in the command line: diskutil list;
Here is an example, from which one can make a conclusion that user’s APFS container is titled /dev/disk1, and appears to be located at /dev/disk0s2.
Begin a New Terminal Session
- Launch Terminal
- Type tmutil listlocalsnapshots / at the command window. Now, you can see the Time Machine snapshots on the partition.
- Type another command: tmutil thinlocalsnapshots / 99999999999999 to remove the snapshots entirely. It might take some time.
- Find out if the entire list of snapshots is not gone with tmutil listlocalsnapshots /.
The Complex Way to Resize Container
Do not close your Terminal yet. If nothing helps, the hardest method may do. Let’s say, your goal is to minimize the size of APFS partition primarily, maybe to set up one more operating system like Windows or Linux on the target Apple computer. To shrink a 1TB container to 650GB, for instance, you should enter the given line: sudo diskutil apfs resizeContainer disk0s2 650g jhfs+ Extra 350g.
The rest 350GB will be Journaled HFS+ partition with the reclaimed space. It is important to apply sude this time to benefit from the Terminal session as Mac’s administrator.
Another thing you may do is to establish the formula this way – diskutil will auto-detect the volume for the new partition: sudo diskutil apfs resizeContainer disk0s2 650g jhfs+ Media 0b.
As for the output of the command, you may obtain the following result:
Finally, to generate numerous partitions, try inputting the offered command in Terminal: sudo diskutil apfs resizeContainer disk0s2 650g jhfs+ Media 200g FAT32 Windows 150g.
How about Trying Disk Utility?
Mac owners who still run older versions of the operating system like Mac OS X can try Disk Utility to solve the problem. Retry the changes you wish to apply to the partitions after the steps described in the Begin a New Terminal Session.
If you are an experienced user and feel more comfortable with using Terminal, run diskutil from the command line. Use the man diskutil command for other details.
Re-activate Time Machine
Do not forget to re-enable Time Machine once you are done with shrinking APFS partition. Switch this tool by:
- Launching System Preferences;
- Choosing Time Machine;
- Putting a tick next to the Backup Automatically feature.