It can live happily in the pantry for up to three years.
Refrigeration adversely affects their flavor, so store in the pantry in paper bags (plastic bags trap moisture and speed decay). Most varieties should last three weeks.
The refrigerator dries it out fast. Instead, keep what you'll eat within four days at room temperature and freeze the rest.
They like their original mesh bag (or any bag that allows for air circulation) in the pantry. But keep them away from potatoes, which emit moisture and gases that can cause onions to rot.
Stash in a drawer at room temperature. Extreme cold (or heat) can diminish performance.
It will do well for two months in the pantry. Store loose, so air can move around it.
They can get mealy in the fridge, so leave them on a counter, out of plastic bags. To speed ripening, store in a paper bag. Once ripe, they'll last for about three days.
The fridge (and the freezer) create condensation, which can affect the flavor of both ground coffee and coffee beans. Coffee fares best in an airtight container in the pantry.
BUT REMEMBER FOR INSTANT COFFEE:
Instant coffee has a long shelf life and could last past the expiration date on the container if it is kept in optimum conditions. The shelf life of instant coffee is longer than that of coffee beans, even longer than for ground coffee. Time is the enemy for coffee beans and ground coffee beans because they lose flavor as the coffee essential oils evaporate over time. Instant coffee does not have this problem due to the manufacturing process of dehydrating coffee into granules or powder form.
Instant coffee does however have a different enemy and its name is Humidity. Instant coffee will quickly spoil if not kept dry. When this happens you will see the instant coffee grains stick together and start turning into a gooey mess, and it won't taste the same, meaning it will taste terrible.
Instant coffee usually comes packaged in glass jars, vacuum packed resealable bags, and tins. You may need to transfer your instant coffee to a smaller air-tight jar with a screw top lid as you use more coffee and the volume of instant coffee goes down, while the air in the empty space of the bottle increases. When this happens there is a chance of introducing more humidity into the container's environment.
Always remember to tightly cap or close the container after taking a portion of your instant coffee out.
Another tip is to always use a clean and dry spoon when measuring out your instant coffee.
How to Store Instant Coffee
Instant coffee was made to be stored pretty much anywhere. This usually means in the pantry closet, kitchen counter top, or dining table. This way of storage works for most dry environments. If you live in an area with high humidity, such as the east side of the Big Island, Hawaii where we now live, than I recommend that you store your instant coffee (tightly capped) in the refrigerator. Other people may insist that you do not need to store instant coffee in the refrigerator and that it defeats the purpose, but they probably live in a dry area so they don't know any better.
Keeping it in the fridge can cause it to thicken. Store at room temperature, away from direct sunlight.
Varieties such as acorn, butternut, delicata, and spaghetti will last for about a month or more in the pantry.