Cannibalism was the act of eating one's own species. Earth had cannibals at one point, but not by 2151. (ENT: "Broken Bow")
In a figurative sense it could also refer to stripping a piece of technology for parts to use elsewhere.
Henry Starling built his business empire upon cannibalizing the timeship Aeon (VOY: "Future's End")
After crashing on the Companion's homeworld, Zefram Cochrane cannibalized his ship. (TOS: "Metamorphosis")
In 2152, Trip Tucker, while stuck on an Arkonian moon, managed to cannibalize the power supply from an Arkonian ship to repair a transceiver. (ENT: "Dawn")
The Tellarite ship Tezra was seized by the Klingon Empire. Believing her impounded, her owner Skalaar turned to bounty hunting in order to pay the impound fee. It was not until his last mission, in 2153, that it was revealed that Tezra had been cannibalized several years earlier. (ENT: "Bounty")