At what point is coffee decaffeinated?

All coffee beans grow with caffeine, since it’s the plant’s defense mechanism against pests. Once harvested, washed and dried, the green coffee beans are either sent to a roaster to be roasted and served as caffeinated coffee, or sent for decaffeination. Caffeine is then removed prior to roasting.