Espresso manufacturers usually package beans in a sealed tight bag lined with foil. This is to keep the beans fresher for longer. Note that beans are considered old after 90 days and will not give you the same quality flavor after the expiration date.
Your biggest concerns when storing your own beans are moisture, light and heat. To keep your espresso beans fresh, store them in an airtight container at room temperature. The beans shouldn’t be placed in a see-through container as light can compromise the quality.
The best place to store your container full of beans is in a cool, dry and dark area such a pantry. You don’t want to place them anywhere near the stove as this area can become too hot when you’re preparing food. And heat will quickly alter the quality of the beans. Never leave it out on the counter as sunlight can also warm them up or the sun’s rays will affect them.
Exposure to air is also bad for your beans. Makes sure the storage canister is tightly sealed with no cracks or areas where air can enter.
It’s also advisable to roast small batches of coffee beans at a time as they begin to lose their freshness as soon as they’re roasted. If you have a large bag of fresh beans, roasting a small amount—enough to last you a week or two—will help you preserve your large batch.