How to Make Garlic Confit and Store It Safely

By the Pan AI team · Updated · 4 min read

Quick answer

To make garlic confit, cover peeled garlic cloves completely with olive or neutral oil in a small baking dish and cook at 250°F (120°C) for 1½–2 hours, until golden and soft enough to mash. Cool it quickly, refrigerate it in a clean jar and use it within 4 days, or freeze it. Never keep garlic in oil at room temperature.

How to Make Garlic Confit and Store It Safely

Handy for this: Cooking oil smoke points · Milliliters to grams converter

At a glance

  1. Heat the oven to 250°F (120°C).
  2. Peel 2–3 heads of garlic, about 1 cup of cloves.
  3. Put the cloves in a small, deep baking dish.
  4. Pour in oil until they are fully covered, about 1–1½ cups.
  5. Bake 1½–2 hours, until golden and soft enough to mash.
  6. Cool to room temperature within 2 hours, then refrigerate.
  7. Use within 4 days, or freeze in portions.

The short version

Garlic confit is garlic cooked slowly in fat until the cloves turn sweet, mellow and spreadable, with none of the raw bite. You get two things from one pan: soft cloves to mash into butter, dressings or mashed potatoes, and garlic oil for cooking. The cooking is easy. The storage is the part that matters, because garlic in oil is one of the few home foods with a real botulism risk.

What Pan would say

“The cloves are pale gold and the bubbles are gentle. Another fifteen minutes and they'll be soft enough to mash.”

Food safety first: why 4 days

Garlic is a low-acid food that can carry Clostridium botulinum spores from the soil. Covered in oil, it sits in exactly the airless conditions those spores need to grow and make toxin, and you can't see, smell or taste it. Cooking the garlic in oil does not make it safe to keep. Oregon State University and Penn State Extension both give the same rule for homemade garlic in oil:

  • Refrigerate it right after it cools, in a clean container.
  • Use it within 4 days, then throw out what's left.
  • Or freeze it for longer storage.
  • Never store it at room temperature, even for a few days.

Shelf-stable garlic oil in stores is acidified under controlled conditions. That can't be reliably copied at home.

Oven vs stovetop method

MethodHeatTimeNotes
Oven250°F (120°C)1½–2 hoursHands-off, most even
Oven, faster300°F (150°C)45–60 minutesWatch for over-browning
StovetopLowest heat, tiny bubbles30–45 minutesSwirl the pan; never let it fry

Done cloves are light golden, not brown, and collapse when pressed with a spoon. Brown garlic tastes bitter. Because the oil stays well below its smoke point, you can use extra-virgin olive oil; see our smoke point chart for oils you'll later cook with at high heat.

How to freeze garlic confit

Freezing is the way to keep a big batch. Spoon cloves with a little oil into an ice cube tray, freeze until solid, then move the cubes to a freezer bag. Each cube is ready to drop into a hot pan, a sauce or mashed potatoes. Strain and freeze the extra oil the same way, or refrigerate it and use it within the same 4 days as the cloves.

A worked example

You peel three heads of garlic, about a cup of cloves, and pack them into a small baking dish with a sprig of thyme. A cup and a quarter of olive oil covers them. At 250°F they show tiny bubbles after 30 minutes; at 90 minutes they are pale gold and squash easily against the side of the dish. You let the dish cool for 40 minutes, jar a few days' worth in the fridge, and freeze the rest in an ice cube tray.

How to use garlic confit

  • Mash it into softened butter for garlic bread.
  • Whisk a few cloves into vinaigrette or mayonnaise.
  • Stir it into mashed potatoes, hummus or a homemade pasta sauce.
  • Spread it on toast with tomatoes and salt.
  • Use the oil to sauté greens such as spinach or kale.

Common mistakes

  • Keeping a jar on the counter. This is the dangerous one. Fridge, 4 days, or freezer.
  • Cloves sticking out of the oil. Exposed tops dry out and brown. Use a smaller, deeper dish.
  • Too much heat. Frying turns the garlic brown and bitter. You want gentle bubbles at most.
  • Topping up an old jar. Each batch gets its own 4 days. Don't mix new confit into old.

Keep going

Next up: How to Make Homemade Pasta Sauce in About 30 Minutes, How to Make Alfredo Sauce from Scratch and How to Cook Pasta.

Spread the soft cloves on warm crostini: baguette slices baked at 400°F for 6–10 minutes.

Want the sweet, soft flavor without the oil? How to roast garlic takes one head and 40 minutes. Or mash it into garlic butter.

Garlic in oil needs the fridge or freezer; see can you freeze garlic.

Pan watches it for you

Pan tells you when the garlic is golden, not brown

Pan watches the dish through your phone camera, tells you when the cloves are golden and soft, and warns you if they start to brown.

  • Tiny bubbles around the cloves: right heat
  • Cloves pale gold: nearly done
  • Cloves turning brown: take it out now
  • Soft when pressed: cool and refrigerate

Pan AI is on iPhone • Android.

Common questions

How long does garlic confit last?

Homemade garlic confit lasts up to 4 days in the refrigerator. Freeze it for longer storage. Never keep it at room temperature.

Can you get botulism from garlic confit?

Yes, if it is stored wrong. Garlic in oil can support botulism at room temperature, which is why it must be refrigerated and used within 4 days, or frozen.

What temperature do you cook garlic confit at?

250°F (120°C) in the oven for 1½–2 hours, or the lowest stovetop heat with only tiny bubbles for 30–45 minutes.

Can I use the oil from garlic confit?

Yes. Use it for cooking or dressings, but treat it like the cloves: refrigerate it and use within 4 days, or freeze it.

Can you freeze garlic confit?

Yes. Freeze the cloves in oil in ice cube trays or small jars, then keep them frozen and use them straight from the freezer.

How do you use garlic confit?

Spread it on toast, mash it into potatoes, whisk it into dressings, or stir it into pasta and sauces. Use the oil for cooking too, within the same 4 days.

Can you make garlic confit on the stove?

Yes. Keep the oil on the lowest heat with only tiny bubbles for 30–45 minutes, swirling the pan, until the cloves are soft and golden. Never let them fry.

Can you make garlic confit in an air fryer?

Yes, in a small oven-safe dish with the cloves fully covered in oil, at the lowest setting, around 250–300°F, until soft. Chill or freeze it right after.

Sources

Reviewed against USDA FSIS, FoodSafety.gov and Oregon State University Extension guidance. How we choose sources and fix mistakes: editorial policy.

Keep cooking