If you don't need all the pesto at once, transfer it, a tablespoon at a time, to the wells of an ice cube tray for individual portions. Place in the freezer until the pesto is frozen, about 3 hours. Remove the pesto cubes from the ice cube tray and store them in the freezer in a a resealable plastic bag until needed.