Apple disabled `diskutil secureErase freespace`..., claiming that this reduces the life of SSD's. But for *virtual* SSD's it is essential to zero out and compactify volumes, to prevent the virtual disk from wasting a lot of storage space on the host. For example, an old Mojave VM provided 40 GB of virtual space, but only needed 8 GB on the host.
It stands to reason that a comparable savings ratio could apply to Catalina. Of the boxes I'm seeing on Vagrant Cloud, the numbers are closer to 100 GB virtual capacity, with 40 GB of host box storage space, which drives my host storage bonkers and ties up my Internet bandwidth for quite some time.
Perhaps Catalina can be installed without involving APFS. Unknown if that is enough to allow the command to work again. Unknown if macOS allows this. Unknown impact on Catalina to run on HFS+ partitions.
`dd` usually does the trick for UNIX guests, but has historically not worked for macOS.
VMware provides a disk shrinking utility. Unknown if that still works for Catalina. In any case, this is helpful for some providers but not VirtualBox, libvirt / qemu, parallels, Azure, AWS, Docker, and so on.
I wonder if `dd` could effectively zero out and shrink APFS partitions, were the mac VM is halted and analyzed by Gparted or similar livecd, at the end of the Vagrant provisioning process. Worth experimenting.
Or perhaps there is another way of accomplishing this?