After I removed some documents (and removed them from the trash), the contents of the binaries is still present on disk (in nxserver/data/binaries).
I can remove them using Admin Center > Repository Binaries > check Delete orphaned binaries > Mark orphaned binaries, but how can this be done programmatically?