While the Disk Utility application is move convenient than using the
diskutil command, often the Disk Utility does not provide sufficient support for non-Apple related tasks. Adding Linux definitely falls into this category. The amount you can shrink a APFS container can found by using the
diskutil command. For example, I have a APFS container on my external drive. Below is the partial output from from the command
diskutil list. This shows the partitions on my external HDD.
/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *400.1 GB disk3
1: EFI EFI 209.7 MB disk3s1
2: Microsoft Reserved 16.8 MB disk3s2
3: Microsoft Basic Data BOOTCAMP 125.7 GB disk3s3
4: Microsoft Basic Data WINSTALL 11.5 GB disk3s4
5: Windows Recovery 629.1 MB disk3s5
6: Apple_APFS Container disk4 200.0 GB disk3s6
7: Apple_HFS BU 61.3 GB disk3s7
8: Apple_HFS Macintosh HD via rEFInd 200.0 MB disk3s8
9: Apple_HFS Preboot 200.0 MB disk3s9
10: Microsoft Basic Data BOTTOM 57.7 MB disk3s10
Since the APFS container has the identifier
disk3s6, I can use the command shown below to determine how much the APFS container can be resized.
diskutil apfs resizecontainer disk3s6 limits
The resulting output is shown below.
Resize limits for APFS Physical Store partition disk3s6:
Current Physical Store partition size on map: 200.0 GB (200000000000 Bytes)
Minimum (constrained by files/snapshots): 76.7 GB (76683403264 Bytes)
Recommended minimum (if used with macOS): 87.4 GB (87420821504 Bytes)
Maximum (constrained by partition map space): 200.0 GB (200000000000 Bytes)
This output shows the minimum size is 76.7 GB. The size of the smallest partition you could created after the APFS container would be hard to determine exactly. Anything reasonably small would be accepted. For example, the command below would create new empty partition of approximately 100 MB in size.
diskutil apfs resizecontainer disk3s6 199.9G %noformat% none 0