To get rid of gnats inside the home, remove any potential food and water sources. If gnats are living in damp areas, such as under sinks, repairs may be required to stop leaks. Eliminating gnats can take several days if damp soil is causing the infestation.
- Eliminate damp soil
Houseplants and landscaping features can attract gnats when the soil is too damp. Allow the soil to dry out before watering, and transplant the plants to containers with adequate drainage. To help eliminate gnats outdoors, reduce irrigation and remove ripened produce from the garden immediately.
- Remove food sources
Gnats are attracted to a number of food sources in the home, including sweet beverages and sugary foods. Rinse dishes after use, and tightly cover any unrefrigerated fruits and vegetables with clear plastic wrap.
- Remove water sources
Gnats may live in hidden areas, such as bathtub drains or damp insulation inside walls. Locate any areas in the home that provide the pests with water, and make the necessary repairs to prevent leaks. For instance, replacing the caulking around the sink and tub can prevent gnats in the bathroom. If gnats are living in the drains, pour very hot water in the drain to remove the pests.