Dinners

How Do We Get Fruit Flies? Causes and Traps

Updated · By Patriot Kitchen

Save

Most people assume fruit flies appear out of nowhere, but they actually ride in on produce or come in through open doors and windows. The accurate answer: fruit flies get into your kitchen as eggs or adults on fruits and vegetables, then breed in fermenting organic matter. You get rid of them by finding and removing the breeding site, then trapping the adults.

Quick answer: Fruit flies come in on produce or through open doors; they breed in moist, fermenting spots like overripe fruit, damp sponges, or trash. Remove the source, then use a vinegar trap.

Fruit Flies Come in on Produce and Through Openings

Fruit flies are tiny (about 1/8 inch, 3 mm) and can fit through most window screens. They are attracted to the smell of ripening or fermenting fruit, so a bowl of bananas on the counter or a compost bin without a lid is an open invitation. They can also hitchhike as eggs laid on the surface of fruit at the store or farm; the eggs hatch after you bring the fruit home.

Once inside, a single female can lay about 500 eggs in her lifetime, and the entire life cycle (egg to adult) can be as short as 8–10 days in warm weather. That is why a small problem becomes a swarm in under two weeks.

Find the Breeding Source Before You Trap

Trapping adults is useless if you do not remove the place they are breeding. Check these spots, in this order:

  • Produce: overripe bananas, tomatoes, onions, potatoes, or any fruit with a bruise or cut.
  • Trash and recycling: empty cans or bottles with leftover juice, food scraps in the bin.
  • Drains: a thin film of organic gunk in the sink drain or garbage disposal.
  • Damp cloths and sponges: fruit flies breed in moist, fermenting cellulose.
  • Recycled containers: jars or bottles that held wine, beer, or juice.

Remove or clean each source. Put produce in the fridge or a sealed container, take out the trash, scrub the drain with a brush and boiling water, and wring out sponges.

The Vinegar Trap That Works in 24 Hours

The classic trap uses apple cider vinegar, which smells like fermenting fruit to the flies. Here is the recipe:

  1. Pour about 1/2 inch (1.3 cm) of apple cider vinegar into a small jar or bowl.
  2. Add one drop of dish soap (this breaks the surface tension so flies sink).
  3. Cover the top with plastic wrap and poke 4–5 small holes with a toothpick.
  4. Place the trap near the source (e.g., on the counter near the fruit bowl).
  5. Empty and refill every 2–3 days until no flies are caught.

You can also use a paper funnel instead of plastic wrap: roll a piece of paper into a cone, tape it, and insert the narrow end into the jar. The flies enter but cannot find the way out.

If you do not have apple cider vinegar, red wine or a piece of overripe fruit in a jar works. The dish soap is essential; without it, flies may land and fly off.

Why Fruit Flies Are Not Gnats or Drain Flies

Many people confuse fruit flies with fungus gnats or drain flies. The difference matters because the control is different.

Pest Appearance Breeding site Best trap
Fruit fly Tiny, tan body, red eyes Fermenting fruit, moist organic matter Vinegar trap
Fungus gnat Small, dark, long legs, flies near soil Moist potting soil Yellow sticky traps; let soil dry
Drain fly Moth-like, fuzzy wings Slime in drains Clean drain with enzyme cleaner

If you see flies hovering around houseplants, they are likely fungus gnats, not fruit flies. If they are near the sink and look fuzzy, they are drain flies. The vinegar trap will not catch gnats or drain flies.

Prevent Fruit Flies in 5 Minutes a Day

Once the swarm is gone, keep it that way with these habits:

  • Store all ripe produce in the fridge or in sealed containers.
  • Take out compost and trash daily in warm months.
  • Rinse recyclables before putting them in the bin.
  • Wipe down counters and clean up spills, especially juice or alcohol.
  • Run the garbage disposal with cold water and a slice of lemon, then flush with boiling water once a week.

If you bring home produce that may have eggs, wash it under running water and dry it before storing. Eggs are killed by washing, but not by a quick rinse; scrub firm-skinned produce like apples and cucumbers.

Fruit Flies in the Winter and From the Store

Fruit flies are active year-round indoors. In winter, they often come in on store-bought herbs, potatoes, or onions. Inspect produce before buying; avoid bags with bruised or damaged items. If you see tiny flies in the produce aisle, they are probably already on the fruit.

For a heavy infestation, you may need multiple traps (one per room) and patience. The average life cycle is 8–10 days, so even after you remove the source, adults may live for up to 2 weeks. Keep traps out for at least 2 weeks after the last sighting.

When to Call a Professional

If you have cleaned every possible source and still see flies after 2 weeks, you may have a different pest, such as phorid flies (which breed in decaying animal matter) or a hidden food spill behind an appliance. Move the refrigerator and stove to check for spilled food, and look under cabinets. If you cannot find the source, a pest control professional can identify the species and locate the breeding site.

Fruit Flies in Compost and Large Batches

If you compost indoors, fruit flies are almost inevitable. Keep compost in a sealed container with a lid, and bury fresh scraps under dry leaves or paper. Freeze fruit scraps before adding them to the compost to kill eggs. For a large batch of produce (e.g., a bushel of tomatoes), process or refrigerate them the same day you bring them home.

For a large area like a restaurant or a big kitchen, set multiple traps (one per 100 square feet / 9 m²) and use a fan to circulate air; fruit flies are weak fliers and avoid drafts.

Related

Safe minimum internal temperatures follow USDA FSIS; raw-fish guidance follows the U.S. FDA. See our food safety notes.

Spotted an error? Tell us and we will correct it (corrections policy).