Prevent and protect your house with these DIY tips and tricks.

By Sarah Yang
Updated July 06, 2016
Sasha Radosavljevic/Getty Images

Once you swat one, there’s another fly buzzing around your house, from room to room. Not only are they a nuisance, flies can transport bacteria (think Salmonella and E.coli). If you have a gnat or fruit fly problem in your home, there are a few solutions to stop them from taking over your space: Blaine Richardson, an associate certified entomologist and COO at EDGE-The Service Company, a pest control company, shared his best solutions.

How to Prevent a Gnat or Fruit Fly Problem:

1. Eliminate Potential Breeding Grounds
First, you’ll want to keep in mind that houseflies breed in moist or damp environments. “Common places in your home include the sink area (around, in, or under it), damp clothes or rags, and potted plants,” Richardson says. “Clean these areas with non-chlorine bleach (mixed with water) and do what you need to avoid future moisture build-up.”

2. Don’t Invite Any Indoors
Keep your windows and doors sealed tight. If you want to open the window to let the breeze in, make sure you have a screen to deter any flies from getting inside.

3. Store and Clean Up Food
Don’t leave anything out that could attract the flies. “Get rid of their food supply,” he says. “Gnats feed on food left out on the counter, dirty dishes, or even in your trash. Store food in the fridge or in airtight containers, don’t leave dirty dishes in the sink, and cover your trash cans.”

How to Deal With a Gnat or Fruit Fly Problem:

1. Use an Insecticide
Follow the prevention steps to stop them at the source. If those methods don’t work, you might want to use an insecticide specifically for gnats, Richardson recommends. The Environmental Protection Agency advises customers to look at product labels carefully: read the ingredients list, follow the directions to a tee, and check if it has an EPA registration number, which means it’s been reviewed by the organization. Product labels will also have the words “Caution” (least harmful), “Warning” (more poisonous than “Caution” products), and “Danger” (very poisonous or irritating).

2. Set Up Traps
You can buy nontoxic traps, like Tero Fruit Fly Traps, that will prevent the flies from breeding. Or, you can make your own with a container, like a jar or cup. “Fill halfway with vinegar or apple cider vinegar,” he says. “Seal the top with a piece of plastic wrap and stretch a rubber band around the top in order to properly seal it. Poke small holes at the top and set it out.” The gnats will be attracted to the vinegar and get trapped inside. You can also create a trap with a funnel, with instructions here.

When to Call the Pros:

If none of the above works, you might want to call in an expert to investigate.