Homemade pesto should keep for 3-5 days when stored in an airtight container in the refrigerator. The color may turn dull or darken due to oxidation (much like guacamole turns brown when exposed to air for too long), but it can still be eaten safely.