Bakery and homemade cookies can be stored at room temperature in an airtight container for 1-2 weeks, in the fridge for up to 2 months, or in the freezer for up to 3 months. Cookies with cream-based toppings need to be stored in the refrigerator and consumed within 3 days. Storebought cookies found on grocery store shelves don't usually require refrigeration and they last longer than homemade or bakery cookies. It's a good idea to consult the packaging for storage instructions and an expiration date.