How Long Does Pesto Last Once Opened?
| ~7 min read | Pasta Sauces
Sections
Once opened, store-bought pesto lasts about 5 to 7 days in the refrigerator, while fresh homemade pesto is best within 3 to 5 days. Both should be kept in an airtight container, ideally with a thin layer of olive oil covering the surface, and both freeze well for several months if you want to keep them longer.
Those windows are shorter than many people expect, and the reason is simple: pesto is a cold, uncooked sauce built from ingredients that spoil at refrigerator temperatures. Basil bruises and darkens, garlic and cheese are moist and low-acid, and the oil seals out air but not the slow chemistry of oxidation and microbial growth. Understanding what is actually in the jar helps you judge how much slack you really have.
Why Pesto Has Such a Short Fridge Life
Pesto is not a preserved food in the way jam or pickles are. It is a fresh emulsion of basil, oil, nuts, hard cheese and garlic, and every one of those components is a spoilage risk on its own.
- Basil oxidizes quickly and turns brown-black once exposed to air, even in the fridge. The color change is harmless at first but signals the sauce is aging.
- Cheese (typically Parmigiano-Reggiano or Pecorino) is a moist dairy product. Once the jar is open, it is exposed to airborne molds that grow well at 40°F (4°C).
- Garlic in an oil base is a known botulism concern when stored at room temperature. In the fridge the risk is much lower but not zero, which is why opened pesto should never sit out on the counter.
- Nuts contain oils that go rancid over weeks, giving an off, paint-like smell.
Commercial jars slow this down with pasteurization, acidification (often citric acid or ascorbic acid) and nitrogen flushing, which is why an unopened jar can sit in the pantry for a year or more. None of that protection survives the first time you twist the lid off.
Store-Bought vs. Homemade: Different Clocks
The two products behave differently enough that they deserve separate rules.
- Commercial refrigerated pesto (the tubs in the deli or chilled section): use within 5 to 7 days of opening. These are usually the most perishable because they contain the least acid and preservative.
- Shelf-stable jarred pesto: also about 5 to 7 days after opening once refrigerated, though the acidulation gives it a little more resilience. Follow the label if it states a shorter window.
- Homemade pesto: 3 to 5 days in the fridge. It has no preservatives and the least acid, and homemade versions with raw garlic carry the same oil-and-garlic caution as any garlic-in-oil preparation.
A common misconception is that a high oil content preserves pesto the way it preserves confit. It does not. Oil excludes oxygen, which slows browning, but it does not kill bacteria or mold spores, and it can trap moisture underneath. Treat oil as a cosmetic and textural layer, not a preservative.
How to Store Opened Pesto Properly
Storage technique makes a measurable difference to both color and shelf life. Work through these steps each time you use the jar.
- Use a clean, dry spoon. A wet or crumb-covered spoon introduces bacteria and stray food particles.
- Press the surface flat and pour a thin film of olive oil over the top, roughly 1/8 inch, to limit air contact.
- Seal with a tight-fitting lid and refrigerate immediately at 40°F (4°C) or below. Do not leave the jar on the counter while you cook.
- Keep the jar in the main body of the fridge, not in the door, where temperature swings are largest.
- Label the jar with the date you opened it if you tend to forget. A strip of tape and a marker is enough.
If you bought a large tub and know you will not finish it in a week, portion it out on day one. Spoon the pesto into an ice cube tray, freeze solid, then transfer the cubes to a freezer bag. Frozen pesto keeps about 3 to 4 months at 0°F (-18°C) with acceptable color and flavor. Thaw cubes in the fridge overnight or drop them straight into hot pasta, where they melt into the sauce.
Signs That Opened Pesto Has Gone Bad
Pesto rarely gives you a dramatic warning. Look and smell before you taste, and throw it out if any of the following appear.
- Visible mold, including small white or green fuzzy patches, especially around the rim and under the lid.
- A sour, fermented or yeasty smell rather than fresh basil and cheese.
- A sharp, bitter or soapy taste, which usually means the nuts have gone rancid.
- Bubbling, fizzing or a swollen lid, which indicates gas-producing microbial activity.
- An oily, separated texture that will not recombine when stirred, often paired with a dull gray-brown color throughout rather than just on the surface.
Surface browning alone is not automatically a reason to discard, but it does mean the pesto is past its best. If the top layer is brown and the rest smells fresh, scrape off the discolored portion and use the remainder in a cooked dish that day. Never taste a pesto you suspect is spoiled; the risk of foodborne illness is not worth a spoonful.
Using Up Pesto Before It Turns
Because the window is short, plan to use opened pesto in ways that consume it quickly rather than in a single drizzle.
- Toss through hot pasta with a splash of the starchy cooking water, which loosens the sauce and helps it cling. Reserve about 1/2 cup of pasta water before draining.
- Stir into a minestrone or bean soup at the end of cooking, off the heat, so the basil stays green.
- Spread on a sandwich or fold into scrambled eggs cooked to 160°F (71°C).
- Thin with lemon juice and more oil for a quick vinaigrette on a pasta salad.
- Mix into ricotta for a lasagna layer, using about 3 to 4 tablespoons per cup of ricotta.
One important cooking note: pesto is a raw sauce and should not be boiled. Add it to pasta off the heat or over very low heat, or the cheese will split and the basil will turn dull. If you are making a hot dish like a baked pasta, add pesto near the end of assembly rather than at the start of baking.
Food Safety Around Pesto
Pesto sits at the intersection of several safety rules worth stating plainly.
- Refrigerate opened pesto within 2 hours of use, or within 1 hour if the room is above 90°F (32°C).
- Never store garlic-in-oil mixtures at room temperature. This applies to homemade pesto and to any oil you pour over the jar.
- Do not taste raw dough or raw egg mixtures. If you make homemade pesto with raw egg (unusual but not unheard of in some regional variations), use pasteurized eggs, especially for anyone pregnant, elderly, very young or immunocompromised.
- Discard any pesto that has been left out overnight. Re-refrigerating it does not undo the time in the temperature danger zone between 40°F and 140°F (4°C and 60°C).
- If you use pesto in a cooked dish, reheat leftovers to 165°F (74°C) and eat them within 3 to 4 days.
Frequently Asked Questions
Can you freeze opened pesto?
Yes. Freeze it in small portions, ideally in an ice cube tray, then bag the cubes. Use within 3 to 4 months at 0°F (-18°C). Expect some color loss and a slightly softer texture after thawing, which is fine for cooking but less ideal for a raw drizzle.
Does covering pesto with olive oil make it last longer?
It slows browning by limiting air contact, but it does not extend the safety window much. Keep to the 5 to 7 day rule for store-bought and 3 to 5 days for homemade regardless of the oil layer.
Is brown pesto safe to eat?
Surface browning is oxidation and is not itself dangerous. If the pesto smells fresh and shows no mold, you can scrape off the brown layer and use the rest in a cooked dish that day. Mold, fizzing, a sour smell or a swollen lid mean discard it.
Can I leave pesto out on the counter?
No. Opened pesto belongs in the refrigerator. Garlic in oil at room temperature is a documented botulism risk, and dairy-based sauces should not sit out more than 2 hours.
How long does unopened pesto last?
Shelf-stable jars typically keep for many months in the pantry, and refrigerated tubs keep until the use-by date on the package. Check the label, and refrigerate after opening.
Can I use pesto that is a day past its window?
Use your senses rather than the calendar alone. If it looks, smells and tastes normal and has been stored properly at 40°F (4°C) or below, a day over is generally low risk. If anything seems off, discard it.