It seems to work to use trackPtr->insertSpaceIntoTrack() for removing space as well as inserting space. Simply give negative values for the space to insert, and it removes the space.
But is this recommended? If not, what would be the recommended way to remove space?