How to get rid of fungus gnats in your worm bin

How to Get Rid of Fungus Gnats in Your Worm Bin (and How to Tell Them Apart from Fruit Flies)

 

If you’ve been worm composting for a while, you’re probably already aware that sometimes things don’t go exactly to plan. One of the most common issues indoor worm farmers encounter is a sudden outbreak of tiny flying insects — and often, it’s hard to know if they’re fungus gnats or fruit flies.

Let’s break down the difference, and then walk you through exactly how to get rid of them for good without harming your worms.


 

Fungus Gnats vs. Fruit Flies: What’s Flying Around Your Worm Bin?

Both of these pests are small, fast, and annoying — but they behave differently and require slightly different approaches. Here’s how to tell them apart:

Trait

Fungus Gnats

Fruit Flies

Appearance

Slender, mosquito-like, with long legs and antennae

Shorter, with red eyes and rounded bodies

Mating Behavior

When mating, fungus gnats look like long, flying “double bugs”

Fruit flies don’t change form when mating

Flight Pattern

Often found hovering near windows and moist soil

Usually stay close to the food source and fly in short bursts

Attracted to

Moist bedding, fungus, overwatered soil

Rotting fruit and sugary foods

Where They Breed

In damp organic material or potting soil

On exposed food surfaces

 

Now that you’ve identified the pest, let’s move on to how you can stop them.

 


 

 

Step-by-Step: How to Get Rid of Gnats or Fruit Flies in Your Worm Bin

 

1. Stop Feeding for 1–2 Weeks

Both gnats and flies are drawn to fresh food scraps. By pausing feedings, you cut off their food supply and give your worms time to process what’s already there. Don’t worry — worms are resilient and can go weeks without new food.

2. Bury Food Deeply When You Resume

Once you’re ready to start feeding again, make sure to bury the food at least 2–3 inches deep in bedding. Avoid juicy, sweet foods like melon, banana peels, or citrus for a while — these are fruit fly favorites.

3. Add LOTS of Dry Bedding

The top layer of your worm bin should always be covered with dry carbon-rich materials like:

  • Shredded cardboard

  • Shredded paper (non-glossy)

  • Coconut coir

  • Egg cartons

A dry surface discourages gnats from laying eggs and helps regulate moisture.

4. Sprinkle Diatomaceous Earth (Optional)

Food-grade diatomaceous earth (DE) is a safe, natural insect deterrent. A light sprinkle on the top layer of bedding can damage soft-bodied insects like gnats without harming your worms. Be careful not to inhale it when applying.

5. Use Vinegar Traps and Sticky Strips

Keep using your cider vinegar traps — they’re great for catching adult flies. Yellow sticky traps placed near the bin or even dangling inside the lid (if it doesn’t touch bedding) can also drastically reduce the population.

6. Check Moisture Levels

Too much moisture is a breeding ground for gnats. Bedding should feel like a wrung-out sponge — not soggy. If needed, mix in more dry bedding and avoid high-moisture scraps for a while.

 


Final Thoughts: Prevention Is Key

 

Once you’ve cleared out the gnat or fruit fly problem, prevention becomes your best friend. Keep the bin well-ventilated, don’t overfeed, and always maintain a dry top layer of bedding.

And remember: it’s normal for even well-maintained bins to occasionally attract pests. With a little knowledge and action, you can keep your worm farm thriving — without unwanted guests.


 

Want more tips like this? Subscribe to our newsletter or explore our Worm Parenting Guide!

Commonly Asked Questions

Does it smell?

A worm farm surprisingly does not smell!

Be sure to follow our instructions included with your parenting guide and join our support channels for troubleshooting!

Where should I put my Box Of Life?

We recommend keeping it indoors in a temperature controlled environment, somewhere easy to access and visible like your kitchen or living.

If you must keep it outdoors, keep in mind that red wiggler worms prefer temperatures between 15-25 C (60-80 F). During freezing cold winters, the worms may die, so it is a good idea to bring them inside. If it is too hot in summer, keep them away from direct sun in a cool, shady space.

How much effort is involved?

Honestly, not much. About 5 minutes a week at most to feed the worms and prepare the bedding.

By diverting food from your trash, you'll notice your garbage doesn't stink anymore which means you can empty it way less often than before.

How can I convince my partner?

The best way to convince your partner to let you keep worms in the house is by promising them that you will take care of them properly, and by following our instructions of course!

Your partner only needs to be mindful of separating food scraps and bedding for the wormies while they are in the kitchen, while you take care of the weekly feeding and maintenance. Treat your wormies like a houseplant!

What can I feed the worm farm?

Ok here's our rule of thumb - if it came from the ground, it can go back into it. This means that you can feed your worms fruits, veggies, paper napkins, cardboard, eggshells, whatever.

A healthy worm farm will recycle your food as well as paper. You are typically going to be feeding an equal amount of food and bedding to your worms.

Just keep in mind that meat and dairy can make your worm bin stinky and attract maggots, so don't add that if you are a new worm parent.

What to do when away on vacation?

If you're going away for two weeks or less, you don't need to do anything. The worms will be fine left alone.

If away for longer, you just need to ensure your worms don't dry out when you're gone. You could ask a friend to water your worm farm and feed them some food every 2 weeks while you are away.

Will my pet damage the worm farm?

So far we have not heard of any complaints from people who have pets and a worm farm. In fact many cat owners report that their furry felines like to sit on top of their boxes.

How do I join the online support community?

We have a robust online community support ecosystem to help you find answers to specific questions.

For convenience, we have a group on Facebook. For those not on social media, we also have a group on Discord, which is a chat platform.

By being a part of our support channels, get instant answers to many of your questions.