While I strongly believe you should only buy one week’s worth of fresh coffee beans at a time, sometimes it just isn’t possible, especially when you live in a smaller city where fresh-roasted, quality beans are simply not available. In this case, you may need to store beans for more than 1 week.
Coffee freshness can be preserved by slowing the oxidation process. Coffee degrades when exposed to heat, light, moisture, and oxygen. Ground coffee degrades in a matter of minutes, which is why I only buy whole bean coffee, and so should you. Whole bean coffee retains its freshness for more than one week, and as much as two weeks. Over that time, the coffee flavor does change, with some aspects degrading, allowing other flavor notes to emerge because not all flavor components degrade at the same rate. At some point, it seems like the oxidation process goes “pedal to the metal” and the coffee turns stale quickly.
The ideal way to store coffee is in whole bean form, in a dry, dark, oxygen-free environment. Modern coffee bags are opaque, and you can fold the top down to remove most of the air, and this is ideal for fresh-roasted coffee because it is convenient and effective. Transferring coffee to storage bins is not as good, because when you remove beans, the void is replaced with air, increasing oxidation. Storing beans in your refrigerator or freezer is generally not good because the change between room temperature and cold causes condensation on the surface of the beans. For long term storage, however, a deep freezer can be effective.
If you happen to buy coffee in bulk, you can divide the coffee into smaller containers, remove all of the air, and then freeze them. The idea is then to remove a single container and then use the coffee within a few days. This means you want to consider how much coffee you use every 3-4 days and size your containers appropriately. Freezer bags can work well, because you can remove all of the air easily. Mason jars also work, if the size matches your needs. Keep in mind that this does not work with a freezer with an “auto-defrost” cycle, because the defrosting cycles the internal temperature to above freezing to remove frost.
Let me make one more note about “grocery store” coffee. The coffee you see on the shelves in grocery stores is sealed into bags with one-way valves that allow carbon dioxide to escape without letting oxygen into the bags. This prevents the coffee from oxidizing, and extends shelf-life of the product for up to 2 months. However, because the carbon dioxide has degassed, once the package is opened, the coffee will oxidize at an accelerated rate and go stale within a few days.
No matter how you look at it, buying fresh, locally-roasted coffee directly from a quality-conscious roaster is the best way to enjoy great coffee, week after week.