How to Get Rid of Fruit Flies

Photo: Volodymyr Lymariev on Unsplash
To get rid of fruit flies, find and remove what they are breeding in, then trap the adults that are left. Throw out or refrigerate overripe fruit, take out the trash and recycling, clean the sink drain and garbage disposal and set a few apple cider vinegar traps. University of Maryland Extension says the primary control for fruit flies is sanitation, and Nebraska Extension notes no insecticide is needed. Traps catch adults, but flies keep coming until the breeding source is gone.
Fruit flies, gnats or drain flies?
| Fruit flies | Fungus gnats | Drain flies | |
|---|---|---|---|
| Look | Tan or brown body, often red eyes | Dark, slender, long legs | Fuzzy, moth-like, wings held flat |
| Size | About 1/12 to 1/8 inch | About 1/16 to 1/8 inch | Small, similar to a gnat |
| Where | Fruit bowl, trash, recycling, sink | Houseplants, windows | Sinks, tubs, floor drains |
Fruit fly size is from UC IPM and fungus gnat size from Oregon State University Extension. If the flies hover around houseplants, see how to get rid of gnats.
Step 1: Find the breeding source
Fruit flies lay eggs in fermenting, moist food. Check:
- The fruit bowl, especially bananas, tomatoes, onions and potatoes.
- The trash can, compost bin and recycling, including bottles and cans with residue.
- Sink drains, the garbage disposal and rarely used drains. Bugwood’s pest guide notes that a rarely used sink, shower, tub or floor drain with a gelatinous film can be an ideal breeding site.
- Mops, sponges and dish rags left wet.
- Spilled juice, soda, beer or wine under appliances.
- Forgotten produce in the pantry or the back of a cabinet.
To check a drain, a University of Rhode Island fact sheet suggests taping clear plastic over the opening overnight. Flies stuck to the plastic in the morning mean the drain is a breeding site.
Step 2: Remove it
- Throw out overripe produce, or keep fruit in the refrigerator until the flies are gone. UMD Extension recommends storing fruit in the fridge.
- Take out trash and recycling, and rinse and drain bottles and cans before they go in the bin.
- Clean the trash can and compost pail with soap and water.
- Scrub drains with a brush. Bugwood suggests pouring boiling water into drains or disposals you cannot reach.
- Replace or wash sponges, rags and mop heads.
Step 3: Trap the adults
Once the source is gone, traps clean up the flies that are left.
- Pour 1 to 2 inches of apple cider vinegar into a jar or glass. UC IPM advises pure apple cider vinegar rather than flavored vinegars.
- Add a drop of unscented dish soap so flies sink instead of landing on the surface.
- Cover the top with plastic wrap held by a rubber band and poke a few small holes in it, or set a paper funnel in the opening.
- Set traps where you see the most flies, and replace the vinegar every few days.
Our fruit fly trap guide covers five homemade versions and how to place them.
Step 4: Keep them from coming back
- Keep ripe fruit in the fridge or eat it quickly.
- Rinse recycling and empty the bin often.
- Run the disposal with water after each use and clean drains weekly.
- Wipe up spills, especially sweet drinks.
- Look over produce before you bring it home and use the ripest pieces first.
How long does it take to get rid of fruit flies?
Once the breeding source is gone and traps are out, adult numbers drop as the traps catch them. Flies still developing in a drain or a forgotten piece of fruit will keep appearing until that source is cleaned out, so if flies are still around after a week, look again for a hidden source.
Do you need a spray?
Usually not. Sprays kill only the flies they hit and do nothing about the eggs and larvae in the breeding source. Nebraska Extension notes the key is eliminating food sources and breeding sites, with no insecticide needed.
Related guides
- Fruit fly trap: five homemade traps.
- How to get rid of gnats: for the small flies around houseplants.
- How to get rid of drain flies: for fuzzy flies near sinks and showers.
- How to get rid of flies: for larger house flies.
- Home pest control: guides for other household pests.


