If you can’t start your day off without a cup of joe, the last thing you want is for your morning pick-me-up to be stale.

“Coffee is so ubiquitous that many people don’t realize it’s actually a complex and extremely fragile agricultural product,” said Ryan Felbinger, customer and wholesale accounts manager at Prima Coffee Equipment in Louisville, KY.

To keep coffee fresh as long as possible, you need to store beans in an air-tight container that’s kept at room temperature. It’s wise to divide your coffee supply into smaller portions that you use daily, that way the unused coffee stays undisturbed for a longer period. Avoid heat and sunlight while keeping in mind that beans retain peak freshness for about two weeks, after that quality will decline.

It’s easy to do damage to your coffee even when you have the best intentions. Fortunately, knowledge is power. By following these tips—and avoiding these mistakes—your daily caffeine fix will be intact whether you drink your coffee today or store it for later consumption.

Do Buy Beans, Not Grounds.

Ever notice that fresh coffee beans have a stronger, richer smell than packaged grounds? When you pre-grind your coffee, it loses some of its taste and aroma over time, said Bill Walsh, owner of PureCoffeeBlog.com. By purchasing your coffee as beans instead of grounds, it will stay more “flavorful and full of life” while it’s being stored, he said.

Do Find a Dark, Airtight Space.

“Air exposure is the fastest way to ruin coffee,” Felbinger said.

That’s because oxygen attacks the oils and flavorful compounds in the beans or grounds. To keep that from happening, you must protect coffee from oxygen while allowing the coffee to release carbon dioxide.

Don’t assume the container holding the coffee that you bought at the grocery store is suitable for long-term storage. In fact, commercial containers generally are not suitable for that, according to the National Coffee Association. CO2 valve bags are a special kind of packaging that allows carbon dioxide to escape from the bag without allowing oxygen to get in. If you can’t find any CO2 valve bags for storing your coffee, a dark, airtight container will do.

Do Divide Into Smaller Portions.

If you keep all of your coffee in an airtight container, you’ve got to open that container each day to get your daily fix, and that could expose unused coffee to air and light. A better idea is to divide your coffee supply into smaller portions, the National Coffee Association recommends. That way, the unused coffee stays undisturbed for a longer period.

man drinking coffee

Do Wrap Before You Freeze.

Freezing your beans can extend the shelf life, but use airtight bags to keep the moisture out, Walsh said. The National Coffee Association recommends that you store coffee in the freezer for no more than a month if you want to preserve the best flavor. When you’re ready for the beans, thaw them out and use them, but don’t refreeze them. Instead, put them back in that dark, airtight container.

Don’t Expose to Heat and Moisture.

Just as oxygen will wreak havoc on your coffee, so will high temperatures and humidity. Evaluate the place where your coffee is stored. You inadvertently may be endangering it. For example, a cabinet that’s over your oven or a basement that’s damp could cause lasting effects that you don’t want.

Don’t Store for Too Long.

If you want the best taste, coffee is one of those products that you just can’t leave sitting around. “Coffee has a two-week window of peak freshness,” Walsh said. After that, it begins a sharp decline in flavor and quality. Although you still can brew it and drink it after that point, the experience may leave a bad taste in your mouth.

Don’t Refrigerate.

Some people may think refrigerating coffee will keep it fresh, but that’s a mistake. Refrigeration actually exposes your coffee to moisture, causing the coffee to deteriorate.

Post updated by SpareFoot, 1/30/2017.