I'm exploring libgcab to do some surgery on a cab/msi file on macOS. This library looks promising it has following calls (reading the .h file):
gcab_cabinet_add_folder gcab_cabinet_write gcab_cabinet_extract
but I see no calls to delete files or folders.