The attached patch adds a new command to GT.M named ZGDCLNUP.
It closes all regions except the ones used in current global directory and first global directory (opened when the process started).
I didn't do much testing at this time. (e.g. using journaled database, memleak, etc.)