Control Tips for Fruit Flies and Fungus Gnats
Fruit Flies and fungus gnats are often confused, as both are tiny flies that can cause indoor annoyance. But they are different insects with different habits and methods of control. Looking closely, fruit flies have a short, light brown body and are attracted to any rotting organic materials. Fungus gnats have a slim, black body and are most attracted to damp soil or potting mix. Neither are dangerous to humans or pets, although severe infestations of fungus gnats will stress potted plants.

Controlling fruit flies indoors:
Fruit flies have incredibly tiny eggs which can easily be brought home on fruit or vegetables. Combined with a very fast life cycle, this means that fruit flies often seem to suddenly pop up indoors 'out of nowhere.' As they feed on any kind of decaying organic matter, they are often attracted to kitchen compost pails once they are inside the house. However they will also live in recycling bins, garbage cans, and sink drains.
They are not typically attracted to vermicompost bins as long as the food waste is consistently buried under a couple centimeters of shredded paper or cardboard. If you notice fruit flies around your vermicompost bin, make sure all the food waste is fully covered and add more paper to the top.
To control sudden fruit fly outbreaks indoors, cut off their food sources for 10-14 days and put out traps:
- Cover sink drains with a stopper when not in use
- Empty garbage cans and recycling bins frequently. If there is liquid/organic matter stuck on the bins, rinse them out with soap and hot water.
- Empty your kitchen compost container frequently and rinse it between uses. Consider keeping the container either in the freezer or outside for 10-14 days.
- There are many ways to make simple fruit fly traps, but all start with a cup or jar filled with an attractive liquid like apple cider vinegar, beer, or wine. Add a few drops of dish soap - this breaks the surface tension so flies will sink rather than be able to perch on the surface of the liquid. Some methods stop there, but to make extra sure flies don't visit the trap and escape, you can also put a lid with tiny holes on top of the jar. Flies will follow the smell of the liquid in through the holes but will not be able to find their way out.

Controlling fungus gnats indoors:
Fungus gnats are common outdoor insects and typically get indoors simply by flying in through an open door or coming in on soil/potted plants that have been outdoors. They prefer damp soil or potting mix and are less attracted to rich organic matter. For this reason they are rarely seen around kitchen compost pails, but they may cause a nuisance in potted plants or vermicompost bins. Keeping 2-3 cm of shredded paper or cardboard on top of vermicompost bins helps to cut down on fungus gnats, but won't fully prevent them.
Fungus gnats are harder to fully eliminate than fruit flies. To control fungus gnat outbreaks indoors, the SWRC recommends using 'predatory nematodes' to interupt their reproduction cycle, as well as traps to cut down on the number of adults.
- Nematodes are a phylum of microscopic worm that includes thousands of different species. Some species are parasites, but most are predators that feed on specific kinds of bacteria, fungi, or other microscopic creatures. Gardening companies have isolated out several species of nematodes that feed on specifically small fly larvae. These are the species that are sold as 'predatory nematodes.'
- 'Predatory nematode' blends will not harm plants or earthworms, as they will only go after fly larvae.
- Look for a gardening store near you or shop online for 'predatory nematodes,' and add them to your vermicompost bin and/or potted plants according to the package instructions. The nematodes will eat the fungus gnat larvae and there will be no new adults. This process will take 2-3 weeks and may need a second application.
- In the meantime you can trap the existing adults. Because fungus gnats are not attracted to the smell of fermenting food, fruit fly traps will not work on them. To trap adult fungus gnats, put brightly-coloured sticky traps near the source of the infestation. These traps are typically sold at gardening stores, or you can make a dyi version by putting a very thin smear of vaseline on a bright yellow object, such as a sunlight dish detergent bottle, and wiping it off/re-applying the vaseline periodically.

Controlling flies in general around outdoor compost bins:
A final place flies can be a nuisance is around an outdoor compost bin during the summer. Outdoors, these flies are a natural part of decomposition, but they can still be unpleasant if there are too many of them.
- To cut down on their numbers, cover additions of food waste right away with a scoop of carbon-rich material like leaves, straw, woodchips, paper, or cardboard. This will make the smell of the food waste less powerful and fewer insects will be drawn to it.
- You can also add a thin layer of soil with the carbon-rich material, which will further contain the smell of food waste.
- This also works well to reduce the number of wasps foraging around fresh food in a compost bin.