-
1
Preheat oven to 450 degrees F (230 degrees C).
-
2
Break garlic cloves off the bulb, but leaving in the peels. Place cloves in a square of foil. Drizzle about 1 tablespoon olive oil over cloves; season with salt and black pepper. Fold foil into a packet with the seams facing up to avoid leakage.
-
3
Bake in the preheated oven, checking every 10 to 15 minutes, until garlic is soft, 30 to 40 minutes. Let cool.
-
4
Heat walnuts in a skillet over medium heat; cook and stir constantly until fragrant and toasted, about 5 minutes. Remove from heat and cool.
-
5
Bring a large pot of lightly salted water to a boil. Pour ice water in a large bowl and set aside. Drop a handful of basil into the boiling water for 2 seconds; remove with a slotted spoon and transfer to the ice water. Repeat with remaining basil. Drain basil from the ice water and squeeze out as much moisture as possible.
-
6
Squeeze garlic to release from the peels and place in a food processor. Add toasted walnuts, basil, and 1 cup olive oil; season with salt and black pepper. Blend in the food processor, scraping sides a few times, until smooth.
-
7
Pour pesto into 1 to 2 ice cube trays; freeze until completely solid, 8 hours or overnight. Pry pesto cubes from the ice cube tray and store in a freezer bag.