Open jarred pesto stored in the fridge should be eaten within three days for best quality. However, some claim it can last up to two weeks, while homemade might last a week.
This inconsistency comes down to the matter of shelf life compared to expiration dates. In the case of pesto, the sauce could be past its prime long before it expires.
Fortunately, there's an easy way to tell when pesto is best thrown away. If it has gone from bright green to dull brown, it's likely developed an unappetizing and funky flavor.