How to Get Rid of Fruit Flies and Gnats in Your House

Are there pesky little flies all over your day-old bananas and potted plants? Here's how to prevent and get rid of fruit flies and gnats indoors.

The average lifespan of a fruit fly is 40 to 50 days—aka much longer than any of us would like. Gnats, on the other hand, have shorter lifespans, but their ability to reproduce at rapid speeds means once you swat one, there's pretty much always another one buzzing around. Not only are they a nuisance, but flies can also transport bacteria (think Salmonella and E.coli).

Fruit flies and gnats are both extremely hard to get rid of. But if you use a multiphase plan of attack, you should be able to spare not only your produce and plants, but our sanity as well. Not only that, but you can also prevent them. Here's everything you need to know if you have a gnat or fruit fly problem.

Getty Images

Where Do Fruit Flies Come From?

Fruit flies can lay up to 500 eggs at a time near the surface of fermenting (ripening) foods or other organic materials like the soil in your houseplants. They can also lay their eggs in sink drains, garbage disposals, empty bottles and cans, garbage bags, and even damp mops and sponges.

Gnats vs. Fruit Flies

To the naked eye, most wouldn't be able to tell the difference between the two. Both gnats and fruit flies are only about 1/8-inch long. The biggest difference is where they like to hang out. Fungus gnats are most likely to be gathered around your indoor potted plants, while you'll find fruit flies around unrefrigerated produce in your kitchen and rotting food in the trashcan. Luckily, you can get prevent and get rid of both gnats and fruit flies in the same way.

How to Prevent Fruit Flies and Gnats

  • 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," says Blaine Richardson, an associate certified entomologist and COO at EDGE-The Service Company, a pest control company. "Clean these areas with non-chlorine bleach (mixed with water) and do what you need to avoid future moisture build-up."
  • 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.
  • Store and clean up food. Don't leave ripened fruit or vegetables—like bananas, onions, tomatoes, or potatoes—exposed; keep them in the refrigerator until the problem is resolved. Fruit flies also tend to like alcohol and other sugary drinks, so be wary of keeping things like an open bottle of wine and juice products out on the counter.

Best Ways to Get Rid of Fruit Flies and Gnats

  • Use an insecticide. If prevention methods don't work, you might want to use an insecticide specifically for gnats, Richardson says. 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).
  • Set up fly traps. Fly traps are important control tools that continue to eliminate new adults as they emerge. While a pyrethrum-based aerosol insecticide may be used to kill adult flies if you can hit them, it won't take care of any eggs or larvae lurking in your kitchen. Store-bought fly traps will prevent the flies from breeding and can be purchased at your local hardware store. These disposable fruit fly traps, which are baited with a nontoxic lure, can catch about 2,000 flies each, and can last for one month. One of our favorite traps to buy is Aunt Fannie's FlyPunch which is non-toxic and super easy to use.

How to Make a Fly Trap with Vinegar

Rather DIY than buy a trap? A simple, free, and effective homemade fly trap can be made with a few household items. Here's how.

What You'll Need:

What to Do:

  1. Form a cone-shaped funnel with an 8-by-10-inch piece of paper. Seal the funnel with tape while leaving a small opening at the narrow end.
  2. Place the funnel into a clean, empty wine bottle or jar.
  3. Bait the jar with a teaspoon of apple cider vinegar.
  4. Place one or more of these traps on counters or in pantries where the pests are seen most often. The fruit flies enter the trap easily, but can't fly out. After you trap all visible flies, kill them with spray or release them outside.
  5. Re-bait and replace jar traps, if necessary.

Pro tip: Don't have vinegar on hand? You can use a slice of ripe banana instead.

Was this page helpful?
Related Articles