The pesto will last for three or four days in the refrigerator and for several months in the freezer.