My community compost pile is incredibly buggy. It's a ~30 gallon bucket, with a closed lid and ventilation holes. It has hundreds of flying bugs swarming in it. As soon as the lid is open they're all over the place. They strike me as being similar to fruit flies, but perhaps more active.

It looks like the compost is getting a decent amount of dry material, but it's hard to know, with all sorts of different people contributing to it on a daily basis.

I imagine that people are refraining from composting, rather than dealing with the bugs. What can be done to make the pile a nicer place?

  • 2
    Where are the ventilation holes? Top only or sides too? How many holes? How big are they or how far apart? Feb 8, 2013 at 9:17
  • Side holes. Four sets of slits all around the barrel. Reasonably wide - wide enough for a fruitfly, and maybe a housefly.
    – Laizer
    Feb 9, 2013 at 20:38

4 Answers 4


Lidded bins tend to have this problem because they run hotter than traditional heaps and seem to be covered because of the lid. Do not underestimate the value of adding newspaper and card to the bin on a regular basis - every time you add anything else in fact. Often times the layers of dry should be as frequent and slightly thicker than the layers of moist (most stuff).

The top might be just damp but that can often hide that the lower levels are soaked and attracting too many flies or it can be that rotting food is calling them in.

I have seen a lot of bins that the owners swear blind are balanced but are in fact just too wet. This can be a health hazard when blow fly are involved.

If it is too wet If the bin is too moist you can often tell by the bad smell when you get in close and/or by excessive seepage from the bottom.

Sometimes the issue is drainage - the liquid is not able to escape the bin into the soil below. Maybe the soil is too hard, too much clay and not enough sand or looser material. In which case the bin needs a lot more dry especially lower down.

You can try sprinkling fine (silver) sand into the compost bin or you may need to simply refrain from adding any vegetative or other most/wet in for a few weeks.

Stale bread, card, wax free paper plates, most animal bedding, sawdust, toilet role tubes, pizza boxes, egg cartons, hair... there is a lot of dry that you could be adding but your real issue is that the dry is on top and the damp is at the bottom. I can't really recommend mucking that out with a big spade because... let's just say slime and stink and stop there. The problem is that turning it is the best bet... sorry.

If it is a shady spot bringing it into full sunlight will help. It's better to need to give the pile a drink once a month in the summer than to have it too wet.

A big culprit is grass cuttings laid in too thick (also teabags and kitchen waste piled too high without dry). The grass can seem almost dry but releases a lot of moisture as it breaks down. Try to get a thin layer of grass between to layers of dry. It never hurts to have sand or twigs below grass to let the air in.

If the problem is fruit, black or vinegar flies If you have a lot of tiny flies these may be vinegar flies in which case then the compost might be about right for moisture but not for containment. These guys look a lot like fruit flies and can be killed off by simply leaving a container of vinegar with a small opening nearby. They will often drown themselves for you. However you need to stop them moving in to start with.

Killing them efficiently does not deal with the problem that attracted too many black flies, fruit flies and vinegar flies to your garden. They have come for the food and one way to stop this is to cover it up. Cover any food or vegetative scraps with a light layer of soil and follow this up with a few inches of brown material (ripped up newspaper, leaves, pencil shavings, plastic free junk mail or straw are all good). Two to four inches should do it.

You should certainly never leave food scraps on the top exposed. This is asking for trouble but most of us have done it. The lid is only going to protect the bin so much. I know of one gentleman who found that his wife had been dumping the peelings into the compost bin and not putting the lid on correctly- when he came back from a week long business trip in mid summer he had a garden full of flies.

If you have been growing and curing tobacco it can make a natural pesticide but if you are growing your own you probably are trying to avoid toxins to start with.


Compost heaps tend to have a lot of bugs. Most of them are good, they help in the decomposition process. However, when there are too many of one specific type you might want to take measures. The appropriate measures depend on the type of bug that is dominant. Most often the heap is too wet (damp is good, soggy is not), too compact and/or has not enough browns. The result is a sour-smelling bin and a lot of flies.

  • Fruitflies: heap is too wet, if possible turn over the heap to help aerate it, then add a dry layer of browns on top (e.g. shredded cardboard boxes or newspapers). Do not add new material until the problem is reduced.
  • Maggots/houseflies: either too wet or too much meat or fish on the heap, take the same measures as with fruitflies but also make sure that all animal products are buried well within the heap.

Covering existing air holes with a fine mesh will prevent (or at least reduce the number of) unwanted insects from entering the bin in the future.

  • What can you say about ants?
    – Earthliŋ
    Feb 13, 2014 at 14:15
  • @Earthliŋ Here you can find my answer on the 'Ants and Compost' question
    – THelper
    Feb 13, 2014 at 14:22
  • Thanks that's very helpful. I had upvoted that answer already, it seems, but forgot the content.
    – Earthliŋ
    Feb 13, 2014 at 15:20

Cover the compost with dried leaves or dried grass to prevent the smell flowing out that attracts flies.

I also read about adding Vinegar to compost, 1 tablespoon per 8-10Kg compost every 15 days to prevent flies.


Consider using a bokashi composting system for your foodscraps. The bokashi process ferments (or pickles) your foodscraps meaning that they are not attractive to pests and bugs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.