If using the oil method above, your pesto will last 2-3 weeks in the fridge (make sure you top up the olive oil after every use, though!) It will last up to 5 days if stored in an airtight container without any added olive oil.