title_body: How long does sealed ground coffee retain its flavors?
upvoted_answer: To answer your question properly it is necessary to explain what coffee beans actually consist of. Around 50% of the coffee bean are carbohydrates, some of them soluble (like sucrose), but most of them are not (they add to body and mouthfeel though as non soluble substances in your cup). Other important parts are acids, such as chlorogenic acid, fatty acids, caffein obviously, proteins and other volatile flavor compounds. There are around 1000 of these volatile flavor compounds.
  
  When the beans are roasted CO2 gas is developed and stored inside the bean. It's a natural oxidation inhibitor as it prevents oxygen from reaching the bean. When you are grinding the beans almost immediately most of the CO2 gas is exhausted. Simultaneously the surface area of the bean is exponentially increased. That means that oxygen has a much larger surface area to "attack" plus the gas protecting these volatile flavor compounds vanishes almost instantly.
  
  Oxidation starts and in 15min. around 60% of these the volatile flavor compounds are evaporated. That is why most pre ground coffee beans smell almost identical when you open the packages, independently of the bean origin. What remains as flavorful compounds are the proteins, that have mostly undergone Maillard reactions, making them rather bitter, the sucrose, caffein and some acids like chlorogenic acid. All beans (Arabica) contain those in more or less the same quantities. The flavor compounds that contribute to origin specific flavors are mostly gone by the time you open up a package of preground coffee.
  
  Thus to answer your question, coffee goes stale almost immediately after grinding. The coffee in the packages you buy in the supermarket is pretty much already stale when they pack it in the factories. Hence you can probably keep an unopened package for about a year before you will note further significant impacts on the flavor, it will just keep getting more bitter as oxidation continues.
  
  Some sources:
  
  
  https://en.wikipedia.org/wiki/Coffee_bean
  https://coffeeconfidential.org/grinding/ground-coffee/
  Severini, C., Derossi, A., Ricci, I., Fiore, A. G., &amp; Caporizzi, R. (2017). How much caffeine in coffee cup? Effects of processing operations, extraction methods and variables. In The Question of Caffeine. InTech. URL: https://www.intechopen.com/books/the-question-of-caffeine/how-much-caffeine-in-coffee-cup-effects-of-processing-operations-extraction-methods-and-variables