Can ContainerToInvert file be safely deleted? After previously upgrading to High Sierra and converting my boot drive to APFS, I recently migrated to a new (larger) SSD boot drive. While setting that up, Disk Utility gave me an error when restoring from my old volume to the new one "APFS inverter failed to invert the volume - invalid argument".

I ended up using Carbon Copy Cloner to transfer the files which went OK, and I am now running from the new volume. 

However I have a file at the root of the drive called ContainerToInvert. It is over 250GB in size, so I'd like to delete it if it isn't needed. 

Can anyone confirm that deleting it won't cause any problems?
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`