Transfer any unused walnut pesto to an airtight container and store it in the fridge. Pesto will keep up to 7 to 10 days when stored properly. You can also freeze it.