Burn their remains in acid or fire, or (if you have the Norse Mythology / Tolkien breed) expose them to sunlight so they'll get turned to stone. Otherwise the remains will slither together and you'll have to fight them again.

DO NOT, I repeat, do not eat a troll. Stomach acid is not powerful enough to dissolve troll tissue before it begins its regeneration, and growing a full-sized troll in one's stomach is unpleasant at best.

mowph says It might be worth noting that eating trolls does work in nethack, but only if you finish eating it before it recovers.