First things first: start with fresh garlic! When buying garlic, leave behind any heads with green sprouts. You want garlic that’s firm, with the skin intact, not flaking off or splitting.  Second: you can buy garlic in many forms, and that’ll make a difference in how you should store it. Here’s how to store the different forms of garlic:

Whole Garlic Heads

These have the longest shelf life of different garlic forms—up to six months, in fact, though there are a lot of variables at play: humidity, temperature, and the quality of the garlic itself. A dark, medium-humidity (not bone-dry) environment is best for whole garlic heads. The ideal temperature, 60°F to 65°F, is cooler than room temperature, but unless you’re storing big braids of garlic, it shouldn’t matter much. Keep whole garlic heads away from the light, if you can, like in a cupboard or a garlic keeper.

Unpeeled Garlic Cloves

Once separated from the head, unpeeled cloves or garlic will keep at cool room temp in a dark spot with good air flow (no bags or airtight containers) for a few weeks.

Peeled Garlic Cloves

Peeled garlic cloves will last a week or longer in the refrigerator. Keep them in an airtight container for 2 to 3 weeks.

Chopped Garlic

The chopped garlic you buy in jars contains preservatives to extend its shelf life, which is why it can last for months in the fridge. But what about garlic you chopped yourself? Keep it in an airtight container and refrigerate for a few days, max; after that, it’ll lose its potency.

Can You Keep Heads of Garlic in the Refrigerator?

Yes, but there’s a catch. The humidity of your crisper drawer prevents a whole head of garlic from drying out. However, once you take that head of garlic from the fridge, it’s very prone to sprouting. The workaround is keeping the head in there and popping cloves off as needed. What’s so bad about sprouted garlic anyway, you ask. Sprouted garlic develops a bitter taste, plus the cloves get rubbery, making them hard to peel and chop.

Can You Freeze Garlic?

I’m so glad you asked. Yes, you can freeze garlic; you just have to do it the right form. While it is possible to freeze whole heads of garlic, as well as separated cloves, we don’t recommend it because the thawed cloves turn soft and rubbery, making them harder to chop. Instead, the best way to freeze garlic is to mince a big batch of garlic and freeze that. A food processor makes quick work of chopping. Freeze the chopped garlic in teaspoon-sized dabs on a lined baking sheet until firm, then wrap together in a foil packet and keep in a zip top bag. Pull the frozen dabs as needed. If you have too many heads of garlic around, you can also make roasted garlic, which you can then freeze.

Is It Safe to Store Garlic in Olive Oil?

Sadly, no. It sounds like a great idea, but it isn’t. Raw garlic stored in oil at room temp or in the fridge can host bacteria that cause botulism.