Freezing pesto is a no-brainer method to prolong its shelf life. Whether you have a large batch of sauce or salvaging leftovers, you can quickly freeze pesto in ice cube trays, flash-freeze until frozen, bag them, and freeze for up to three months.