What are fungus gnats?
Fungus gnats are rather aptly named little bugs. They feed on fungi and decaying plant material in the soil but can become a pest when humidity and moisture levels are high. Fungus gnats actually don't do much harm to your plants on their own. They can, however, be very annoying to deal with flying around your home.

Symptoms
Visible Gnats
Small, dark flying insects around the soil surface and near the plant.Larvae in the Soil
Tiny, translucent larvae visible in the top layer of the soil, often seen when the soil is disturbed.

What to do now
Let the soil dry between waterings, but stay within the plant’s drought tolerance. Note that this won't work for plants that require constant moisture.
Use yellow sticky traps. They will provide a way to see just how large the infestation is and will help catch the adults before they can lay more eggs.
Consider using biological control such as nematodes, predatory mites or the popular Bacillus thuringiensis.
Hypoaspis miles, also known as Stratiolaelaps scimitus, is a type of predatory mite that live in the soil around the plant stem. They'll happily feed on fungus gnat eggs and larvae as well as thrip pupae.

Common questions
Are my plants at risk?
Generally speaking, no. While adult fungus gnats are mostly a nuisance, they rarely pose a direct threat to healthy, established plants. However, their larvae can worsen underlying issues, such as root rot, by feeding on weakened roots.
If your plants frequently stand in damp, poorly-drained soil, then they may be more prone to attracting fungus gnats. Ensure your pots have drainage holes and use a well-aerated soil mix. Additionally, check your pots for decaying organic debris on the soil surface, such as fallen leaves.
What do they look like?
These insects are about the same size as a fruit fly, although they are darker and more slender when you take a close look.
What do they eat?
Their main food is fungi, leaf mold and organic material in the soil, so maintaining your plant’s general health will help to reduce the risk of drowning in fungus gnats.
Where do they come from?
Fungus gnats usually enter the home in pots of newly purchased plants or bags of soil, arriving as eggs, larvae, or adults. They also occur naturally outdoors and can easily fly in through open windows or doors. Because of this, it is almost impossible to avoid them entirely in the long run.
Why do I see a sudden population boom?
There are several potential causes for a sudden spike in gnat numbers:
Recent repotting. Fresh soil contains organic material that isn't fully decomposed. This can trigger a temporary increase in mold growth, providing a buffet for gnats. This usually settles down on its own after 1-2 months.
Organic fertilizers. Certain fertilizers contain organic ingredients that aren't fully decomposed and promote soil mold too, which in turn fuels the gnat population.
Underlying health issues. A surge in gnats can be a secondary symptom of a deeper problem, such as root rot. Decaying roots provide an ideal food source and breeding ground for the larvae.
Can I prevent this in the future?
If you've got more than a few plants, some fungus gnats are inevitable. Just keep an eye on your collection so you can treat the issue before they get out of hand. Keeping some sticky fly traps close to your plants will catch some of the adults flying around and keep numbers under control. If they begin to increase in numbers, that's a sign that you might want to use other methods too.
How long do they live?
A generation of fungus gnats can develop in about 17 days, though warmer temperatures can accelerate this cycle. While adults only live for around a week, they can lay up to 300 eggs. These eggs have a short incubation period (about 4 days), meaning multiple generations often coexist in the same pot.
What is Bacillus thuringiensis israelensis
BTI (Bacillus thuringiensis israelensis) is a type of bacteria that works well as an insecticide. It's best applied as a soil drench to target the larvae and break the fungus gnat life-cycle.
Can they fly?
Fungus gnats can certainly fly, however, they are quite weak fliers so are more likely to be found close to pots or near a window.
Do they bite humans?
Luckily, fungus gnats don't bite, so they aren't a threat to humans.