The last 2 weeks, the house has been infested with what we believe are fungas gnats. About the size of fruit flies, attracted to dark surfaces and windows. I suspect they came in on a parsley plant that was taken from the outdoors.
We have covered the soil in the house plants with sand, had our fruit fly mix of water fruit juice vinegar and dish soap on the counters (killed lots), and stopped keeping compost in the house.
This hasn't been enough, they still seem to be reproducing.
Depends on what plants they are infesting. If its something that can survive without water for a while like cacti, pelargoniums etc just stop watering them and the larvae will die. Anything that needs water you need to still water as little as possible.
If you cover the top with sand don't forget they will still try to live in the bottom of the pot too so you will need a dish to put some sand in there too. I have used DE in the past as a barrier and its worked pretty well but again you have to reapply when wet.
Adding neem to water can also help kill the larvae too.
You can buy fungus gnat nematodes they are really effective but expensive.
In any situation you have to make sure you get every single pot or you might find the problem doesn't go away.
I know someone who claims to have success with using salt petre too. Have not done it myself, but appeared to work for them anyway.
Happily living in the valley of the dried frogs with a few tiny ads.
advertising for free (and not-free) on permies.com