Coffee is bagged to best preserve the product as long as possible, but it won't last forever.  Coffee will taste best when ground immediately before brewing. Grind only the amount of coffee you plan to brew and store the remainder in an airtight container, away from direct sunlight, heat, and sources of humidity. Avoid putting your coffee in the refrigerator or freezer.