Carolyn Raab, PhD., R.D and Margy Woodburn, Ph.D.
SP 50-701 | Revised January 2025 | |

Download this publication as a PDF

NOTE: Use this publication for flavored oils not covered in Making Garlic- and Herb-Infused Oils at Home.

It’s important to keep food safety in mind when storing vegetables (such as garlic, mushrooms, chili peppers) or herbs in oil. These low-acid foods can be a source of Clostridium botulinum bacteria, which are found in soil, water, and air. Low acid foods stored in oil create an oxygen-free environment which is perfect for growth of Clostridium botulinum bacteria. For this reason, herbs and vegetables in oil must be stored correctly to prevent botulism food poisoning.

Commercial garlic-in-oil mixtures are acidified to prevent bacterial growth. These products can be stored safely at room temperature. Research has been done on acidification procedures for a few common herbs and vegetables for home preservers, which can be used to infuse oils for storage at room temperature. The acidification directions must be followed exactly. Information can be found in the publication Making Garlic-and Herb-Infused Oils at Home (PNW664).

It is essential for all other flavored oils made at home, including pesto, to be stored in the refrigerator for up to 4 days or frozen for long term storage. Label containers with the date that the oil mixture was prepared as well as the date (four days later) by which the mixture must be used or else frozen for longer storage.

Hint: Package flavored oils to be frozen in airtight containers such as small glass or plastic jars to prevent vibrant aroma of the herbs and vegetables from penetrating other foods in freezer.

Oils to use

Any kind vegetable oil can be infused. Olive oils often are infused with flavor materials to give them their distinct flavor. Peanut and avocado oil also have distinct flavors. Canola oils are blander, so herbs and vegetable flavors will be more distinct. Both olive and canola are nice because they contain fewer polyunsaturated fatty acids than other vegetable oils so they oxidize and turn rancid less quickly.

Fresh vegetables/herbs in oil

Place whole or crushed vegetables and/or herbs in a clean container. Add oil and refrigerate. Use within 4 days or freeze for long-term storage. Crushed vegetables and herbs in oil can be frozen in ice cube trays and then packaged in airtight containers to be used as seasonings.

Dried garlic and/or dried herbs in oil

If oil is seasoned with dried garlic and/or dried herbs, the mixture MUST be refrigerated and used within 4 days or frozen for long-term storage.

Dried tomatoes in oil

Dried tomatoes-in-oil mixtures seasoned with garlic and/or herbs must be refrigerated and used within 4 days or frozen for long-term storage.

Tomatoes stored in oil must first be fully dried until leathery or crisp, with no residual moisture. To create a softer final product, dip dried tomatoes briefly in bottled lemon or lime juice before placing them in the oil. No other liquid should be used for pre-treating than bottled lemon or lime juice at the risk of raising the pH. Pack tomatoes into a jar or storage container and cover completely with oil.

Store in the refrigerator for up to 6 months, or freeze for long term storage. Cold storage is required for safety, but it will also delay the oil from becoming rancid.

Note: Dried tomatoes-in-oil mixtures seasoned with garlic and/or herbs must be refrigerated and used within 4 days or frozen for long-term storage.

Dried tomatoes in oil can be used on pizza, pasta salads, appetizers, and Italian dishes. The oil can be used in vinaigrette dressing, or in a marinade sauce. It can also be used as a dip for French bread.

Pesto

Pesto (an uncooked seasoning which includes fresh basil, garlic, pine nuts, and oil) must be refrigerated and used within 4 days or frozen for long-term storage. No research has been done on safe canning times for pesto.


Recipes

Basic Pesto

  • ¼ cup pine nuts (or sunflower seeds, walnuts, or a combination)
  • 3 cloves garlic
  • 2 cups fresh greens such as basil, parsley, spinach leaves or carrot tops or a combination of greens)
  • ¼ cup grated Parmesan cheese
  • ¼ teaspoon salt
  • ¼-1/2 cup olive oil

Finely chop nuts and garlic in a food processor. (A blender can also be used, but it is more time-consuming. Add greens and chop very fine. Add Parmesan cheese and salt. Mix well. When everything is well blended, add ¼ cup oil and mix all ingredients together add more oil if needed to get to the consistency you like. Store pesto in the refrigerator and use within 4 days or freeze for long-term storage.

Pesto can be frozen in ice cube trays.

Hint: Pesto can be frozen in ice cube trays. When frozen, wrap individual cubes in plastic wrap and store in a freezer container. These cubes can be used for seasoning soups, stews and sauces.

Related articles


Reference: Nummer, B.A., Schaffner, D.W., Fraser, A.M., and Andress, E.L. Current food safety issues of home-prepared vegetables and herbs stored in oil. Food Protection Trends 31:336-342, 2011.

Developed by Carolyn Raab, PhD., R.D., Extension Foods and Nutrition Specialist, and Margy Woodburn, Ph.D., Emeritus Professor, Nutrition and Food Management.

Was this page helpful?

Related Content from OSU Extension

Have a question? Ask Extension!

Ask Extension is a way for you to get answers from the Oregon State University Extension Service. We have experts in family and health, community development, food and agriculture, coastal issues, forestry, programs for young people, and gardening.