Store homemade pesto in an airtight container in the refrigerator up to 7 days. Drizzle a thin layer of olive oil on top of the pesto to help preserve its vibrant green color.