Zero-Waste Kitchen

Compost Smells Bad or Has Fruit Flies? Fixes That Actually Work

Does your compost smell like rotten eggs, a public toilet or sour achaar? The smell is telling you exactly what’s wrong. Almost every case of compost that smells bad comes down to too much water, too many wet scraps or not enough air, and the fix is dry browns and a good stir. Fruit flies and maggots have fixes too, and one kind of “maggot” is actually on your side.

The short version

  • Rotten egg or sewage smell: too wet, no air. Add dry browns, stir, open drain holes.
  • Ammonia smell: too many greens. Add browns.
  • Sour or vinegar smell: too much fruit at once. Add browns and a handful of soil.
  • No smell, nothing happening: too dry. Add water and some fresh greens.
  • Fruit flies: food showing on top. Bury every lot under browns, lid on.
  • Flat brown larvae: likely black soldier fly. Harmless, fast composters.

Why does compost smell bad? Read the smell

A healthy bin smells of damp earth or forest floor. When it goes wrong, the microbes that need air die back and a different crowd, ones that live without air, take over. They make the nasty gases. So the fix is nearly always the same idea: dry it out a bit and let air back in.

Smell or signWhat’s wrongFix
Rotten eggs, sewage, “like poop”Too wet, packed tight, no airMix in 2 to 3 scoops of dry browns, stir well, clear the drain holes
Ammonia, like a dirty toiletToo many greens (peels, grass)Add browns until the peels are hidden, stir
Sour, vinegar, alcoholLots of fruit at once, fermentingAdd browns and a handful of soil or old compost, stir
Rancid, greasyOil, dairy or meat went inDig it out if you can find it, add browns
Nothing, and nothing changesToo drySprinkle water to wrung-sponge damp, add fresh greens

The fix for a smelly bucket, step by step

  1. Take the lid off and let it air for 10 minutes in a shady, open spot.
  2. Check the drain holes in the base. Poke them clear with a skewer; slimy liquid in the tray means water has been sitting.
  3. Add 2 to 3 scoops (roughly 2 to 3 litres) of torn cardboard, egg trays or dry leaves.
  4. Stir from the bottom up with a stick until no wet clumps remain. Wet, grey clumps are where the smell lives.
  5. Squeeze a handful. A few drops of water is right. Still dripping? Add another scoop of browns.
  6. Stop adding scraps for 3 to 4 days. Most smells fade within a week.

Why did it happen? Usually one of three things: a heavy fruit week (mango season is the classic), a monsoon with no extra browns, or a bin standing in rain. The balance rules are set out in how to make compost at home in a flat.

Compost bin fruit flies: how to get rid of them

Fruit flies find exposed fruit and peels within hours. They don’t come from the bin by magic; they came in on fruit from the market, and your bin gave them a nursery. Here’s the fix, in order of what matters most:

  • Cover every lot: no peel should ever be visible on top. Two scoops of browns over each katori of scraps.
  • Lid on: a lid, or an old cotton cloth tied over the matka mouth, blocks the adults.
  • Kitchen caddy: empty it daily in summer. That’s where most flies start, not the balcony bin.
  • Freeze tough fruit scraps: mango and banana peels frozen for a day before going in carry far fewer fly eggs.

A simple vinegar trap

  1. Pour 3 to 4 tablespoons of apple cider vinegar into a small glass or katori. Plain white sirka works less well, so drop in a slice of overripe banana with it.
  2. Add one drop of dishwashing liquid. It breaks the surface so flies sink instead of landing.
  3. Cover with cling film and poke 5 or 6 holes with a toothpick.
  4. Set it next to the bin, away from children and pets, and replace every 3 to 4 days.

A trap catches flies you already have. It won’t fix a bin with food on top. For flies on food in the kitchen itself, a separate problem, see keeping flies off food without spraying.

Compost maggots: which ones are good and which aren’t

Open the lid and see wriggling larvae, and most people panic. Look first.

Black soldier fly larvae are flat, segmented and pale to greyish-brown, up to about 2 cm long, and they move in a busy crowd. They’re harmless to people, don’t carry disease the way houseflies do, and eat through scraps remarkably fast. The adults look like slim black wasps but can’t sting or bite, and they don’t come looking for your food.

Adult black soldier flies barely eat at all. They live on the fat they stored as larvae.

Leave them in the bin if you can stand them. Keep the lid on so they stay on the balcony.

Housefly maggots are small, white, pointed at one end and usually mean meat, fish, dairy or pet mess got in, or food was left uncovered. Dig out the source, add a thick layer of browns, and keep the lid firmly closed. If there are a lot, bag the top layer and bin it.

Ants, rats and cockroaches in the compost

Ants mean the bin is too dry, or there’s sugar in it (sweet chai leaves, mithai crumbs). Water it to damp-sponge level and stir; ants dislike wet compost. Cockroaches come for cooked food; stop adding it and seal gaps in the lid. Rats are a firm sign that meat, bones, oily food or lots of cooked leftovers went in. Remove them, fit a lid that clips shut, and stand the bin on bricks with no gaps a rat could use to climb in. The full list of what to keep out is in what not to put in compost at home.

Keeping neighbours happy in a flat

A balanced bin gives off no smell a neighbour could notice. The complaints come from drips, flies and trays of dark liquid. Put the bin on the side of the balcony away from the neighbour’s window, keep a tray under it, and every few days empty that tray onto the soil of flower pots, diluted (about 1 cup to a full watering can), or down the drain. If you’ve had a smelly week, tell them you’re fixing it. People forgive a lot when they know.

Take care if

Never use insect spray, phenyl or bleach in a compost bin or near herb and vegetable pots; they kill the compost and can end up in food. Keep vinegar traps and the bin out of reach of small children and pets, and wash hands with soap after touching compost. Empty trays and lids of standing water, especially in monsoon, because that’s where the dengue mosquito breeds. If a rat problem spreads into the building, it’s a job for the building management, not a home fix; our pest-proofing checklist covers entry points. Anyone bitten by a rat should wash the wound well and see a doctor the same day.

Smelly compost and compost flies: more questions

Why does my compost smell bad?

Usually it’s too wet and packed down, so air can’t get in. Add dry browns such as torn cardboard or dry leaves and stir well; most smells go within a week.

Why does my compost smell like ammonia?

There are too many greens, such as peels or fresh grass, for the amount of browns. Mix in browns until no peels are visible.

Why does my compost bin have fruit flies?

Food is showing on top or the kitchen caddy is sitting too long. Bury every lot under browns, keep the lid on and empty the caddy daily.

Compost smells like sewage or poop, what do I do?

That’s a bin with no air. Clear the drain holes, add two or three scoops of browns and stir from the bottom up.

Are maggots in compost bad?

Not always. Flat, brownish black soldier fly larvae are harmless and speed things up; small white housefly maggots usually mean meat, dairy or uncovered food went in.

Why does my compost smell sour?

Too much fruit at once is fermenting. Add browns and a handful of soil or old compost and hold off on fruit scraps for a few days.

Can I spray insecticide on compost flies?

No. Sprays kill the life that makes compost and can reach your food plants. Cover scraps, use a lid and set a vinegar trap instead.

How to keep a kitchen compost bin from smelling?

Use a small lidded caddy, line it with newspaper and empty it every day or two. Rinse it with plain water between uses.

Does compost attract rats?

Only when meat, bones, oily food or lots of cooked leftovers go in, or the bin has gaps. Keep those out and use a lid that clips shut.

Should compost smell at all?

Yes, but only like damp soil or leaves. A sweet, earthy smell is a sign it’s working well.

Why are there ants in my compost?

It’s too dry or has sugar in it. Water it lightly, stir, and rinse sweet chai leaves before adding them.

How long does a compost smell last after fixing?

Usually a few days to a week once you’ve added browns and stirred. If it’s still bad after two weeks, it’s probably still too wet or has something like oil or meat hidden in it.

More on wasting less in the kitchen is in our Zero-Waste Kitchen section.

Nothing on The Care Online is medical advice. Traditional practices are described as tradition, not as fact. Patch-test anything new, and take a persistent or serious concern to a qualified professional. See how posts are written on our methodology page.