One way is to wash the beans in liquid carbon dioxide. This has to be done in a pressure chamber since carbon dioxide cannot be a liquid at atmospheric pressure. Caffene is soluble in carbon dioxide, but most of the other flavour compounds are not. When the washing is complete, the pressure is released and any remaining carbon dioxide quickly evaporates away.
Latest Answers