Quick answer
Homemade garlic oil made with fresh garlic lasts 4 days in the refrigerator at 40°F (4°C) or colder, then it must be thrown away. Never keep it at room temperature, because garlic in oil can grow the bacteria that cause botulism. To keep it longer, freeze it for up to several months. CDC; NCHFP.
The common mistake is treating garlic oil like plain oil. Covering fresh garlic in oil does not preserve it. It creates the conditions the bacteria need.

Garlic oil storage times
| What you made | Where to keep it | How long |
|---|---|---|
| Fresh garlic cloves in oil, or garlic-infused oil | Refrigerator, 40°F (4°C) or colder | No more than 4 days, then throw it away |
| Same mixture | Freezer | Up to several months (NCHFP) |
| Roasted or confit garlic stored in oil | Refrigerator | Our application: treat it as garlic in oil, 4 days |
| Oil with dried garlic or dried herbs | Refrigerator | 4 days, or freeze (OSU Extension) |
| Any garlic in oil | Counter or pantry | Not safe. Do not store it at room temperature |
| Garlic and oil mixture made with the tested citric acid method | Room temperature, fridge or freezer | Only if every step of the tested method is followed exactly |
Sources: CDC, NCHFP, OSU Extension SP 50-701 and UC ANR.
Why garlic in oil is a botulism risk
OSU Extension says Clostridium botulinum bacteria are found in soil, water and air, and that low-acid foods stored in oil create an oxygen-free environment where they can grow. OSU Extension. University of California food-safety specialists say moisture, room temperature, lack of oxygen and garlic's low acidity all favor growth of the bacteria, and that when it grows it makes an extremely potent toxin. Botulism can cause paralysis and death within days if it is not treated. UC ANR
The risk is not theoretical. UC reports at least four botulism outbreaks linked to garlic-in-oil mixtures in North America in the late 1980s and 1990s, and says the 1991 outbreak in California and the 1999 outbreak in Florida were linked to garlic in oil prepared at home. UC ANR
How to store garlic oil safely
- Make small batches, chill or freeze them right away, and label the jar with the date you made it and the date to throw it away (4 days later).
- Keep it in the refrigerator the whole time. The NCHFP says research it performed confirmed that garlic in oil stored at room temperature is at risk for botulism. NCHFP
- To freeze, use glass freezer jars or plastic freezer boxes with ½-inch headspace, then label, date and freeze. NCHFP
- Crushed vegetables and herbs in oil can be frozen in ice cube trays, then packed into airtight containers to use as seasonings. OSU Extension
Roasted garlic and confit in oil
UC says the same hazard applies to roasted garlic stored in oil. UC ANR. We did not find a separate time for confit, so our application is to use the garlic-in-oil limit: refrigerate it and use it within 4 days, or freeze it.
Dried garlic in oil: two sources, one safe choice
OSU Extension says oil seasoned with dried garlic or dried herbs must be refrigerated and used within 4 days or frozen. OSU Extension. UC says fully dried garlic can be used to flavor oils if it has not been rehydrated and no moisture is added, and warns that dry garlic can absorb moisture in humid places. UC ANR. We follow the stricter OSU advice: refrigerate it for 4 days or freeze it.
Can vinegar or lemon juice make garlic oil safe?
Not as a shortcut. UC says that acidifying whole garlic in vinegar is lengthy and highly variable, with a whole clove taking from 3 days to more than a week, so there are no home guidelines for it. A tested home method uses citric acid powder and a precise soak, and UC says neither lemon juice nor vinegar was tested for this and they should not be substituted. UC ANR. OSU Extension says acidification directions must be followed exactly and points to its publication Making Garlic- and Herb-Infused Oils at Home. We do not repeat the recipe here.
Store-bought garlic-in-oil is different. OSU says commercial garlic-in-oil mixtures are acidified and can be stored safely at room temperature. Our advice: follow the label for storage after opening. OSU Extension
If you want garlic that lasts, UC says peeled cloves can be submerged in undiluted wine or vinegar and kept in the refrigerator for about 4 months. That keeps the cloves, not an oil. UC ANR
FAQs
How long does homemade garlic oil last in the fridge?
No more than 4 days, according to CDC and the National Center for Home Food Preservation. Keep it at 40°F (4°C) or colder and throw it away after day 4.
Can you store garlic in oil at room temperature?
No. Fresh garlic in oil at room temperature has the conditions botulism bacteria need: low acidity, no oxygen and warmth. The only exception is a mixture made with a tested acidification method, followed exactly.
Can you freeze garlic in oil?
Yes. The NCHFP says garlic in oil can be frozen for long-term storage, up to several months, in glass freezer jars or plastic freezer boxes with ½-inch headspace. Label and date it.
Sources
This article uses US, UK and Canadian food-safety and university extension guidance. Follow stricter local advice and product instructions. Sources checked November 23, 2026. How we research our guides.