The following are causes of gnats inside your house:
- Moisture: Moist breeding grounds for gnats include food spillage, moist potting soil, overwatered grass or plants, garbage cans, puddles in kitchen or outside your house, leaky pipes under the sink, and condensation around windows and vents.
- Fruits and vegetables: Fruit flies appear when you leave produce out in the open, especially sweet-smelling fruits. They are also attracted to fallen or rotten fruits in your garden.
- Decaying organic material: Fungus gnats love rotting plants and flowers. Things they feed on include fungus, mold, moss, and compost. They typically live in your potting soil where they can feed on either root rot or decaying leaves.