Yes. Onion and garlic scraps compost cleanly in any composting environment — backyard pile, indoor worm bin, or municipal organics. The conventional wisdom that they “kill worms” or “repel beneficial bacteria” or “prevent decomposition” is mostly wrong, partially based on misunderstandings of how compost piles actually work, and the source of more confusion than any other category of food scrap.
Jump to:
- The basic science
- Where the bad advice comes from
- Practical tips for composting alliums
- What about cooked onion and garlic?
- What about garlic and onion that have sprouted or rotted?
- Will alliums attract pests?
- What about commercial composting?
- A worked example: a typical week of allium scraps
- Specific consideration: garlic-heavy kitchens
- A note on garlic skins for the garden directly
- What about the smell
- The bottom line
This post walks through the actual science, explains where the bad advice comes from, and covers the practical tips that prevent the small issues that can occur with concentrated allium scraps.
The basic science
Onion and garlic are part of the Allium genus — the same family as leeks, shallots, chives, and scallions. They contain sulfur compounds that produce their distinctive smell and flavor. The two most studied compounds are allicin (in garlic, formed when cells are crushed) and various sulfides and thiosulfinates (in onions and across the genus).
These compounds are antimicrobial in vitro — meaning, in a laboratory dish with isolated bacteria, allium extracts can inhibit microbial growth. This is the source of the “alliums are bad for compost” belief: if alliums kill bacteria in a lab, they should kill the bacteria that drive composting, right?
In a compost pile or bin, this doesn’t happen. The reasons:
- Dilution. Even a heavily allium-loaded compost pile contains alliums at concentrations far below what affects microbial activity in lab settings. The thousands of pounds of mixed organic material in a typical compost pile dilute any antimicrobial compound to near-irrelevance.
- Compound breakdown. The antimicrobial sulfur compounds in alliums break down rapidly in moist, microbially active environments. Allicin specifically has a half-life of hours to a few days in aqueous environments. By the time fresh allium scraps have integrated into the compost pile, the active compounds have largely degraded.
- Microbial diversity. Compost piles host extremely diverse microbial communities — thousands of bacterial species, fungi, archaea, protists. Even if some species were inhibited by allium compounds, other species would be unaffected and would continue decomposition. Composting is a robust ecosystem-level process, not a single-species reaction.
- Worms aren’t bothered. Earthworms in worm bins don’t experience adverse effects from alliums in the bin in the quantities a typical household generates. Studies on vermicomposting with allium-rich feedstocks have not shown the worm-killing effect that conventional wisdom predicts.
Where the bad advice comes from
Several plausible sources have contributed to the persistent “no alliums in compost” advice:
Confusion with worm bin specific concerns. Some early vermicomposting guides warned against alliums in indoor worm bins. The actual concern wasn’t worm death — it was that concentrated alliums in a small enclosed bin could produce strong odors that bothered the household, and that the worms might initially avoid the area where alliums were dumped (which slowed processing in that spot). This is a manageable issue, not a prohibition.
Confusion with citrus concerns. Citrus peels in concentrated quantities can lower pH in worm bins to levels that affect worm activity. Citrus and onion sometimes get lumped together in “things to avoid” lists despite having different (and different-magnitude) concerns.
Garden lore conflation. Some gardeners use garlic or onion sprays as natural pest deterrents in the garden. This led to the reasonable-sounding inference that “alliums repel beneficial insects in compost too.” But the application context is completely different: a concentrated topical spray on leaves is very different from dispersed scraps in a moist composting environment.
Experimental misreadings. Some cited “experiments” showing alliums inhibiting compost activity used concentrations or conditions that don’t reflect normal composting. A petri dish with concentrated allium extract isn’t a compost pile.
Practical tips for composting alliums
Even though alliums compost cleanly, a few practical tips make the process work better:
Cut larger pieces. Whole onions or whole garlic bulbs take much longer to decompose than chopped pieces. The thick layers of an intact onion, in particular, hold moisture and resist microbial penetration. Chop or crush onions and garlic before tossing them in the bin. A rough chop is sufficient.
Mix into the pile, don’t dump on top. A pile of allium scraps on the compost surface can produce a localized strong smell that attracts flies and bothers the neighbors. Mixing them into the existing pile dilutes the smell concern and accelerates integration with the existing microbial community.
Cover with browns. A layer of dry leaves, shredded newspaper, or sawdust over fresh allium scraps controls smell and adds carbon balance.
Avoid extreme concentrations in worm bins. If you’re vermicomposting and you have a particularly large allium event (juicing 10 onions for a stock recipe, peeling a head of garlic for pesto), spread the scraps across multiple feedings or use a different bin for that batch. The worms aren’t going to die, but they may avoid the allium-heavy area and slow processing locally.
Onion skins are excellent. The papery outer skin of onions and the dry skin layers around garlic cloves are particularly good compost material — high in nitrogen, easy to decompose, and they don’t carry the strong smell of fresh-cut alliums. Don’t throw these away; they’re some of the best scraps to compost.
What about cooked onion and garlic?
Cooked alliums (sautéed onions, garlic-infused oil residue, leftover pasta sauce containing garlic) compost the same way as raw alliums. The cooking process doesn’t change the compost behavior meaningfully. The same advice applies: chop or break up larger pieces, mix into the pile, balance with browns.
The one caveat for cooked alliums: cooked allium scraps that are mixed with significant oil or fat can be more odor-attractive and more flycraft-attractive than raw allium scraps. If you’re composting heavily oil-coated cooked alliums, bury them deeper in the pile and cover well.
What about garlic and onion that have sprouted or rotted?
Sprouted garlic or onion (with the green sprout coming out the top) composts the same way as non-sprouted. The sprout adds some additional green nitrogen content. No issue.
Rotted onion or garlic (slimy, smelly, blackened) composts cleanly and quickly — the decomposition is already underway when you add it to the pile. Use rubber gloves to handle if you find them gross, dump them into the bin, cover with browns or with a layer of dry pile material.
Will alliums attract pests?
Strong-smelling food scraps in any compost pile can attract flies, raccoons, rats, or other pests if not managed. Alliums aren’t disproportionately worse than other strong-smelling scraps. The general rules apply: cover food scraps with browns, use a covered bin in pest-prone areas, don’t leave fresh scraps exposed on the surface for days.
In an active hot compost pile, strong smells dissipate quickly because the high temperatures accelerate decomposition. In a cold or slow pile, smells linger longer regardless of food type.
What about commercial composting?
Municipal organics programs and commercial composting facilities accept onion and garlic without restriction. The high temperatures (130-160°F sustained) at commercial facilities completely process alliums within the standard 30-90 day composting cycle. There’s no operational concern.
A worked example: a typical week of allium scraps
To make this concrete, here’s what a typical home cook generates in alliums per week and what to do with it:
- 2-3 onion ends and skins from cooking (about 1/4 lb of compostable material)
- 1 large garlic stem and a few skin fragments (about 1 oz)
- Occasional half-onion that didn’t get used and went bad (about 1/4 lb)
- Once a month, a “stock prep” event where 5-10 onion scraps and similar garlic accumulate in a single session (about 1-2 lbs)
Total weekly: maybe 1/2 to 1 lb of allium scraps. Total monthly with the stock-prep events: 3-5 lbs.
This is a trivial amount in any compost system. A backyard compost pile of 50-200 lbs of mixed material easily processes this without notice. A municipal organics cart that gets emptied weekly handles it without issue. A worm bin with 1-2 lbs of worms processes a few ounces of alliums per feeding without difficulty.
The “don’t compost alliums” advice would have you sending 3-5 lbs of perfectly compostable material to landfill every month for no actual benefit. Skip the bad advice.
Specific consideration: garlic-heavy kitchens
Some kitchens generate disproportionate allium volumes — Italian, Korean, Indian, Middle Eastern, and Latin American home cooking traditions all use significant quantities of fresh garlic and onion. A household cooking these cuisines might generate 2-4 lbs of allium scraps per week rather than the half-pound to one pound a typical American kitchen produces.
The advice doesn’t change at this volume. A backyard compost pile of 100-300 lbs of mixed material easily handles 2-4 lbs of weekly alliums. The integration just takes a little longer (an extra few days to a week to fully decompose) and the smell management discipline matters more.
For a high-allium kitchen specifically, useful adaptations:
- Empty the kitchen compost pail to the outdoor bin every 1-2 days rather than every 3-5
- Use a slightly larger countertop pail to handle the volume between empties
- Add a generous layer of browns to the outdoor bin each time you empty fresh allium scraps in
- If you’re vermicomposting, run a parallel outdoor pile for the higher-volume allium events (stock-making, large recipe batches) and keep the worm bin for everyday lower-allium scraps
A note on garlic skins for the garden directly
A small bonus: garlic skins (the papery outer layers, not the cloves themselves) make excellent direct mulch for garden beds. Many gardeners skip the compost step entirely for garlic skins and just sprinkle them around plants where they slowly decompose into the soil. The trace antimicrobial compounds may also have a mild pest-deterrent effect on garden beds (the evidence is weaker here but the practice is harmless and may help).
This isn’t necessary — composting garlic skins works fine — but it’s a quick option for households generating a lot of garlic-skin volume that want to skip the compost step.
What about the smell
The one legitimate concern with alliums in a kitchen compost pail is smell. Fresh-cut onion and garlic in a small enclosed pail, especially in warm weather, can develop a strong smell within 1-2 days. The fix is the same as for any kitchen compost smell: empty the pail more frequently (every 2-3 days rather than weekly), use a compostable liner bag that captures odors, or store the pail in the refrigerator or freezer between empties (which works surprisingly well for households with small kitchen pails).
For households who specifically dislike onion smell in their compost pail, a workaround: collect alliums separately in a small bag in the freezer until you’re ready to take them directly to the outdoor bin. This bypasses the kitchen-pail smell issue entirely.
The bottom line
Onion and garlic compost cleanly. The “don’t compost alliums” advice is wrong. Chop them, mix them into the pile, balance with browns, and proceed. The microbial community in your compost pile handles alliums without problem; the worms in your worm bin don’t die from them; the finished compost is normal.
The main practical considerations are smell management in indoor pails and physical chopping for faster integration. Beyond that, treat allium scraps the same as any other compostable food scrap.
For households or businesses building out their composting setup, the compostable trash bags and compost liner bags categories cover the bag side of the equation and make in-home collection cleaner regardless of what scraps are going in.
For B2B sourcing, see our compostable supplies catalog or compostable bags catalog.
For procurement teams verifying compostable claims, the controlling references are BPI certification (North America), EN 13432 (EU), and the FTC Green Guides on environmental marketing claims — these are the only sources U.S. enforcement actions cite.