If stored properly in any kind of airtight container, pesto should last at least 5 days in the refrigerator.