mid-15c., probably from Old English trymian, trymman "strengthen, fortify, confirm; comfort; incite; set in order, arrange, prepare, make ready; become strong," from trum "strong, stable," from Proto-Germanic *trum-, from PIE *dru-mo-, suffixed form of root *deru- "be firm, solid, steadfast." Examples in Middle English are wanting.
Original sense is preserved in nautical phrase in fighting trim (see trim (n.)); where the verb meant "distribute the load of a ship so she floats on an even keel" (1570s). Meaning "make neat by cutting" is first recorded 1520s; that of "decorate, adorn" is from 1540s. Sense of "reduce" is attested from 1966.