Kopi Luwak civets choose which cherries to eat – i.e. those that are most ripe and flawless. Digestive mechanisms may improve the flavor profile of the coffee beans that have been eaten. The civet eats the cherries for the fleshy pulp, then in the digestive tract, fermentation occurs. The civet's protease enzymes seep into the beans, making shorter peptides and more free amino acids. Early production began when beans were gathered in the wild from where a civet would defecate as a means to mark its territory. On farms, civets are either caged or allowed to roam within defined boundaries. Coffee berries
Kopi Luwak are eaten by a civet for their fruit pulp. After spending about a day and a half in the civet's digestive tract the beans are then defecated in clumps, having kept their shape and still covered with some of the fleshy berry's inner layers. Despite being in contact with faeces and pathogenic organisms, the beans contain negligible amounts of the enteric (pathogenic) organisms associated with feces. Moreover, the "cherry" or endocarp surrounding the bean is not completely digested by the luwak, and after being collected, the farmer performs thorough washing and removes the endocarp. The final roasting of the beans