Photo: rawpixel · CC0
Find the source before you set a trap. Tiny flies around houseplants are fungus gnats and come from wet soil. Flies around fruit or the bin are fruit flies. Flies near a sink are drain flies. A trap only mops up the adults, so the source is the actual fix.
Work out which fly you actually have
All three get called gnats, and they need different fixes. Watch where they land and rest when they are not flying.
| Where they gather | Likely culprit | Breeding in |
|---|---|---|
| Houseplants, windows near plants | Fungus gnats | The top inch of damp potting soil |
| Fruit bowl, recycling, wine glasses | Fruit flies | Fermenting sugars and residue |
| Sink, shower, floor drain | Drain flies | The gunk film inside the drain |
| Around the bin only | Either of the last two | Liquid at the bottom of the liner |

The trap that works overnight
- Half fill a small bowl or mug with apple cider vinegar. Cheap vinegar is fine.
- Add one drop of dish soap and stir it in. The soap breaks the surface tension so they sink instead of standing on top and flying off.
- Set it where you see the most activity, not where it looks tidiest.
- Cover with plastic wrap and poke a few small holes if you have children or pets around.
- Put out two or three in different rooms and replace them every few days.
Fruit flies go for this hardest. Fungus gnats respond better to yellow sticky cards pushed into the pot, because they hover near soil rather than chasing smells.
Cut off the source
- Plants. Stop watering until the top two inches of soil are dry. Fungus gnat larvae need moisture and cannot survive a dry layer. Bottom watering keeps the surface drier.
- Fruit. Refrigerate anything ripe, wash produce when it comes in, and check for the one soft potato or onion at the back of the cupboard. That single item is usually the whole problem.
- Bins. Rinse recycling, take the liner out every night for a week, and wash the bin itself.
- Drains. Pour boiling water down, then scrub the inside walls with a bottle brush. Drain flies breed in the film on the pipe wall, so a liquid that runs straight through does very little.
- Spills. Look under the fridge and behind the bin for anything sticky that dried months ago.
What does not work
Bug bombs and room sprays kill whatever is flying at that moment and nothing in the soil or the drain, so the population is back within days. Citronella candles are made for outdoor mosquitoes. Cinnamon and other pantry remedies passed around online have no meaningful effect on an active infestation. If flies keep coming back after two weeks of dry soil, clean drains, and no exposed fruit, check for a hidden water source such as a slow leak under a sink or a plant saucer that never dries out.