Use a systemic insecticide As fungus gnats breed in compost, you can treat it with insecticide to control them. Look for the systemic chemical imidacloprid, which is available as a drench to control vine weevil larvae. Mix up the drench following the pack instructions, then water onto the compost at the stated dose. Treat every plant in your home, even those without flies, as the chemical will stay active and protect them from gnats for up to three months.
Project by Dr. Ross Bayton