If you want to keep your ground coffee or whole beans fresh, the best way to do it is to store them in an opaque, airtight container on a pantry shelf. According to Scott McMartin, a member of the Starbucks Green Coffee Quality group who has tasted more than half a million cups of coffee, it should be away from light, heat and humidity. If you don't have a can, close the top of the bag with an elastic band and then place it in a resealable plastic bag. This will help prevent cell structure changes that lead to the loss of oils that give coffee its aroma and flavor.
Many coffee connoisseurs keep their stashes in the freezer, but this is not the best option. Coffee should be stored in a dry, airtight container in a cool, dark and dry place such as a kitchen cabinet. Avoid hot areas like the oven or stove and moisture-prone areas like the refrigerator or shelves above the stove. The general rule of thumb when it comes to coffee storage is to keep it away from light, heat, moisture and air.
An opaque, airtight container is ideal but if the bag the coffee came in has an airtight seal such as a zip lock, you can use it. Make sure to squeeze extra air out of the bag before closing the seal. The pantry is the best option for storing coffee beans and ground coffee as it provides safety away from light, heat and moisture. This will help ensure that your coffee lasts longer and maintains its stronger flavor.