The smell of rotting food attracts gnats, also known as fruit flies or vinegar flies. They will also reside in and around over-saturated houseplants and congregate around water supplies. Each gnat is capable of laying 220 to 300 eggs in its four-month lifespan. To prevent a gnat explosion in your home, get rid of your houseplant’s gnats early. Several techniques can be used to accomplish this.
Treat the Houseplants
Allow the houseplant's soil to dry until it is damp to the touch. Do not add water during this time.
Remove the top 2 to 3 inches of soil from around the plant. Be careful not to disturb the plant's roots.
Replace the soil with fresh sterilized soil. Cover this with a layer of fine peat moss to deter gnats from returning.
Water moderately taking care not to over-saturate the houseplant.
Repeat for other houseplants in the home.
Treat the Area
Store all fruits and vegetables in the refrigerator or in sealed bins. Dispose of scraps, trash and compost materials promptly.
Use a hammer to puncture six to eight holes in a jar lid. Pour vinegar in a jar and cover with the lid to lure gnats inside.
Pour vegetable oil around sink areas where gnats are present as gnats coated in vegetable oil are unable to breed.
Slice a potato into 1/2-inch slices. Place one slice on top of the soil of each houseplant to lure larvae.
Remove soil and its collected larvae after two days. Repeat the potato slice step as necessary until no more larvae are visible on the potato.