"Autocrop Layer" removes borders from the active layer. It searches the
active layer for the largest possible border area that all has the same
color, and then crops this area from the layer.
10.57.1.
Activate Dialog
This command can be accessed from an image menubar as
Layer → Autocrop Layer.