Yes, you can freeze pesto to use for later. Make a big batch of pesto at the end of the summer with fresh basil and store it for later. After you make pesto, pour the pesto into ice cube trays and then transfer those cubes into a large airtight container in the freezer. From there you can use a couple of cubes whenever you need pesto.