I am new to composting and started my first pile a few weeks ago. I've only put the following things in the pile:

  • Yard waste - grass clippings from mowing, clippings from my garden, clippings from trimmed bushes, pulled-up weeds, dead leaves on the ground, etc.
  • Paper products - cardboard, shredded paper, etc.
  • Kitchen scraps - here I have been very selective, just egg shells and vegetables (like if excess lettuce goes bad before we get to it)

The pile is going ok - it's definitely still very "chunky" compared to the ones I see professionals do on YouTube videos - but there is definitely decay and things are breaking down.

What I am finding, though, is that my pile seems to be attracting swarms of these gnats or little flies. They look a bit like fruit flies, but I've been careful not to put any fruit in the compost pile. Fortunately, the compost pile is in the back corner of my yard, so the flies aren't coming in the house or anything, but whenever I walk to the pile to put something in dozens of little gnats come flying up in the air right when I get there.

My question: is this common? Or am I putting something "wrong" in the pile? These gnats/flies are no where else in my yard.


  • Is your compost heap consistently wet to very wet? Is it in the sun, part sun, or shade?
    – Jurp
    Apr 24, 2021 at 3:28
  • It's in the shade and I'd say it's closer to dry than wet. The gnats are not those tiny flying insects you get if your yard is overwatered. They are bigger than that, like in between fruit fly size and actual house fly size, if that's at all helpful. Apr 24, 2021 at 4:01
  • I'm pretty sure there's a rat living in my allotment compost bins. We try to ignore each other.
    – Peter4075
    Apr 24, 2021 at 11:16
  • I was thinking of fungus gnats, but they're smaller than the insects you describe. They live in the soil/potting soil/compost and are decomposers in their larval stage.
    – Jurp
    Apr 24, 2021 at 22:02

1 Answer 1


So I figured it out.

Short answer: the flies are indeed fruit flies.

Long answer: What I did was walk out to the compost pile, which caused the flies to buzz. I then stood still for a minute or so until the flies settled back down, then I leaned in close to look at them and, yep, they were very typical-looking fruit flies.

After further investigation, I found out that whenever my youngest child has been having a banana for snack, he's been throwing the peel into the compost pile. (He's seen me take out kitchen scraps and wanted to help in his own way.) Anywho, I presume the banana peels are the source of the fruit flies.

  • That's a nice story. Congrats on teaching your child how to compost.
    – Peter4075
    May 26, 2021 at 8:05

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.