Remove keys from segment

Removes identity keys from the specified segment in the given environment.