Can ContainerToInvert file be safely deleted?
This often happens after cloning APFS drives using Disk Utility. The size of the file usually relates to the cloned partition size.

You can use the following steps to mount the ContainerToInvert file as an APFS container and access all the partitions.


Download and install FUSE
Download and install xmount1
Open Terminal (usually located within Applications/Utilities)
Type sudo mkdir /Volumes/apfs_image/ into Terminal and press Enter (when prompted, enter your password)
Type sudo mkdir /Volumes/apfs_mounted/ into Terminal and press Enter (when prompted, enter your password)
Type sudo xmount --in raw &lt;path to ContainerToInvert file&gt; --out dmg /Volumes/apfs_image/ into Terminal and press Enter (when prompted, enter your password)
Type hdiutil attach -nomount /Volumes/apfs_image/ContainerToInvert.dmg into Terminal and press Enter (when prompted, enter your password)
Type diskutil ap list into Terminal and press Enter (when prompted, enter your password)
Type diskutil ap unlockVolume &lt;Disk GUID&gt; -nomount into Terminal and press Enter (when prompted, enter your password)
Type sudo mount_apfs -o rdonly,noexec,noowners /dev/disk# /Volumes/apfs_mounted/ into Terminal and press Enter (when prompted, enter your password)
Now you'll have the original partition mounted
Browse the disk image to inspect the contents and once satisfied there's nothing there you need to transfer across you can unmount and delete the entire .dmg file


The above steps are based on the Mount All the Things! – Mounting APFS and 4k Disk Images on macOS 10.13 blog entry.

1. If you have trouble installing xmount, then run the following command in Terminal and try again:

 `mkdir -p /Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext`