Many items that attract gnats and flies outside of your home are commonly found inside as well. Fruits and vegetables that aren’t stored in sealed containers could easily be the source of an infestation. Fresh flowers and houseplants also appeal to these pests. Some gnats, like the fungus gnat, will even live and reproduce in the soil of potted plants that have a high moisture content. Food spillage, garbage cans that aren’t sealed and sink drains that aren’t routinely cleaned can provide food, water, shelter and breeding sites for a host of flying insects.