Garlic in oil is delicious and handy, but it is also one of the few homemade preparations where a mistake can really go wrong. The good news is that once you understand the one rule that matters, you can enjoy it all year without the slightest worry. Here are the methods that are truly safe, the garlic confit recipe step by step, and the traps to avoid.
What you’ll learn
- Why garlic in oil is a special case, and what it has to do with botulism.
- The only three methods that are truly safe for keeping it.
- The detailed recipe for garlic confit in olive oil.
- How long to keep it and where, without ever taking a risk.
Sommaire
At my local market in Najac, in southwest France, people often ask me questions about home canning and preserving. Garlic in oil is one of the preparations that worries them most, and for good reason. Picture a beautiful jar of golden cloves bathing in olive oil, sitting on the kitchen shelf for months: is it still safe to eat?
My answer often surprises people, so I’ll give it to you right away: that jar, on a shelf at room temperature for months, I wouldn’t eat it. Not out of excess caution, but because garlic in oil is precisely the combination the botulism bacterium likes best. That is no reason to give it up: done right, it is a treat. It is a reason to do it right.
The trouble is that online you’ll find everything and its opposite: recipes telling you to leave the jar at room temperature “so the flavors develop”, and others that forbid it outright. Between the two lies the truth, and it is simple to understand. That is what this article is about.
1. Can you really keep garlic in oil?
Yes, but only under specific conditions, and never just any old way. To understand why, you have to look at what happens inside the jar.
Oil has a property people tend to forget: it shuts out air completely. A clove of garlic under oil therefore ends up in an oxygen-free environment. That is exactly where Clostridium botulinum, the bacterium that causes botulism, thrives: it only grows where there is no air. Add to that the fact that garlic is a low-acid vegetable that naturally carries spores from the soil, and you have ideal conditions, especially if the jar stays at room temperature.
That is what makes garlic in oil a special case among home preserves. Jam or tomato sauce are protected by their acidity; garlic in oil has none of those natural defenses. Here we’ll stay practical: how to make your garlic in oil both delicious and perfectly safe.
The rule fits in one sentence: you have to remove at least one of the conditions the bacterium needs. You either add acidity, keep it cold, or stop everything by freezing. That is the principle behind the three methods below.
2. The three truly safe methods
2.1 Garlic confit, kept in the fridge
This is the best one for flavor. You cook the cloves slowly in oil at a low temperature: they become soft, mellow, almost sweet. Cooking reduces the initial microbial load, but, and this is the key point, it does not make the jar last forever. Once confit, the garlic is kept in the fridge, in a clean container, and eaten within four days.
Cooking at 185 to 194 °F (85 to 90 °C) does not destroy botulism spores: for the bacterium, garlic confit under oil is still a low-acid vegetable deprived of air. The American universities that have studied the question, Cornell and Michigan State among them, apply the same limit to it as to raw garlic: four days in the fridge, otherwise the freezer. Never at room temperature, never “forgotten” at the back of the cupboard. The detailed recipe is in section 3.
2.2 Acidified garlic before the oil
This is the chemical safeguard, and it is the only one that has been tested in a lab for garlic in oil. It comes from the universities of Idaho, Oregon and Washington (extension publication PNW 664), and you follow it to the letter.
Dissolve 1 level tablespoon of citric acid powder in 2 cups of warm water: that gives you a 3% solution. Coarsely chop the peeled garlic into pieces no larger than ¼ inch (6 mm), and use one part garlic to three parts solution, by weight. Soak for 24 hours at room temperature, drain, then cover with oil.
Three details matter. Vinegar and lemon juice have not been tested and do not replace citric acid. Whole cloves don’t work: they acidify too slowly to reach the required level. And citric acid is not the same thing as ascorbic acid, vitamin C, which doesn’t have the same effect. Prepared this way, the garlic no longer needs the cold to be safe, according to the authors of the method. I’d still recommend the fridge, which keeps the oil tasting good much longer.
2.3 Garlic in oil, frozen in portions
This is the zero-risk method, and by far the most practical day to day. Blend the garlic with a little oil, spoon it into an ice-cube tray, and freeze. Freezing stops the bacterium completely: no growth is possible. You then pop out small cubes ready for your stir-fries and sauces. This is what I recommend to anyone who simply wants garlic on hand without having to think about it.
3. Garlic confit in olive oil, step by step
Here is the cooked version, the one everyone loves. You’ll need one well-filled head of garlic, enough olive oil to cover the cloves, and a few herbs if you like (thyme, bay leaf, pepper).

- Peel the cloves whole, removing the small green germ in the center if the garlic is old. Discard any clove that is stained or damaged.
- Put them in a small saucepan and cover them completely with olive oil. Add your herbs if you want.
- Cook over very low heat, around 185 to 194 °F (85 to 90 °C): the oil should barely shiver, and above all not fry. You need low, steady heat for 30 to 45 minutes, until the cloves are soft and lightly golden.
- Let it cool slightly, then transfer the cloves and oil into a clean, dry jar, making sure the garlic stays fully covered.
- Close the jar and put it in the fridge as soon as it has cooled.
A simple rule of thumb: if you don’t plan to eat it all within four days, don’t make a big jar. Make a small one, or freeze some of the confit oil in portions. That is smarter than ending up with a jar you hesitate to finish.
4. The mistakes you should never make
Most accidents come from three gestures that seem harmless.
The first is leaving raw garlic in oil at room temperature. It is mistake number one, and the one you see most often in online recipes. Raw cloves, oil and a warm cupboard make the perfect scenario for the toxin. Even if “it’s always been done that way in the family”, it is a real risk.
The second is trusting looks and smell. Botulinum toxin has no smell, no color and no taste. A contaminated jar of garlic in oil can look perfectly normal. Your senses don’t protect you here: only the way it was made counts.
The third is keeping a jar “for later” for months. The more time passes, the more chance the bacterium has to produce its toxin. Garlic in oil is not a long-term preserve: it is a fresh preparation that you eat quickly, or freeze.
5. How long to keep it, and where
Each method has its own shelf life and its own place. Here is the reference to keep in mind.
| Method | Where | How long |
|---|---|---|
| Raw garlic in oil | Fridge | 4 days |
| Cooked garlic confit | Fridge | 4 days |
| Chopped garlic acidified with citric acid (tested method PNW 664), then oil | Fridge recommended, for flavor | Safe according to the tested method; the cold keeps the flavor longer |
| Cloves soaked in vinegar or lemon, then oil | Fridge | Untested method: 4 days, like raw garlic |
| Garlic blended with oil, frozen | Freezer | Several months |
| Raw garlic in oil, at room temperature | Nowhere | Never |
And if any doubt creeps in, a forgotten jar, a time limit passed, a jar left at room temperature, apply the one rule that is never negotiable: when in doubt, throw it out. The cost of a jar of garlic is trivial next to the cost of food poisoning. You don’t taste it “to see”: you throw the jar out closed, and you make a fresh batch.
One last reassuring point: don’t mistake cloudy or partly solid oil in the cold for a danger sign. In the fridge, olive oil turns cloudy and partly sets, which is perfectly normal, and it turns clear again at room temperature. It is not a warning sign, just physics.
Conclusion
Garlic in oil sums up the whole philosophy of home preserving on its own: it is neither dangerous nor forbidden, as long as you understand why you do each step. Remove one of the conditions the bacterium needs, cold, acidity or freezing, and you can enjoy soft, fragrant garlic with complete peace of mind.
The three methods complement each other depending on how you use them: garlic confit in the fridge when you make it for the week, frozen cubes to rescue a weeknight stir-fry, and citric acid acidification when you want it to last longer. None of these methods is complicated; they just require you to know what you’re doing. And that, at heart, is what taking back control of your food means: turning a vague fear into simple gestures you can trust.
If you’d like a first project in home charcuterie, my homemade deli ham without nitrites and my slow French method for pork rillettes follow the same approach: understand the risk first, then enjoy.
Further reading
- University of Idaho, Oregon State University and Washington State University, “Making Garlic- and Herb-Infused Oils at Home”, PNW 664.
- Penn State Extension, “How to Safely Make Infused Oils”.
FAQ
Can you keep garlic in oil at room temperature?
No. That is exactly the situation to avoid: the oil deprives the garlic of oxygen, and at room temperature the botulism bacterium can grow in it. Garlic in oil is kept in the fridge and eaten quickly, or in the freezer.
How long does garlic confit keep in the fridge?
Four days, in a clean, tightly closed container, just like raw garlic in oil: cooking does not destroy botulism spores. If you made more, freeze the extra in portions rather than keeping it longer.
How rare is botulism from garlic confit?
Botulism is rare, but garlic in oil is one of the classic causes of it at home, which is why the four-day rule exists. The risk doesn’t come from the cooking itself but from storage: a jar kept for weeks, or left at room temperature, gives the bacterium the time and the conditions it needs.
Should I throw out the jar of garlic in oil that sat on the shelf?
Yes, if it stayed at room temperature for several days or weeks. The toxin can’t be seen or smelled: doubt is enough to throw it out, without tasting.
Why does my olive oil solidify in the fridge?
That is normal and harmless: olive oil turns cloudy and partly solid in the cold, then becomes liquid again at room temperature. It is not a sign of spoilage.