How to Get Rid of Fruit Flies: Easy Traps and Tips to Keep Them Away
Get rid of fruit flies for good: find where they breed, set easy DIY traps, and break their life cycle in about two weeks. Simple steps anyone can follow.

On this page
To get rid of fruit flies, you need to do two things at the same time. First, remove what they are breeding in, like ripe fruit, trash, and dirty drains. Second, trap the adult flies with a simple apple cider vinegar trap. Keep doing both for about two weeks, and the fruit flies will be gone.
Fruit flies are tiny, tan flies with red eyes, about the size of a sesame seed. You often see them hovering around fruit bowls, trash cans, and sinks. A few flies can turn into a swarm very fast. Each female can lay hundreds of eggs, and a new generation can be flying in about a week.
That is why traps alone rarely work. This guide shows you how to stop them at the source.
Why you suddenly have fruit flies
Fruit flies are drawn to the smell of fermenting food. That is food that is very ripe or starting to rot. They can find it from outside and slip in through doors, windows, and screens.
They also hitch a ride. Fruit flies often lay eggs on fruit and vegetables at the store or farm. You bring them home without knowing it, and a few days later, you have flies.
Fruit flies love warm weather. That is why they are most common in summer and early fall.
The fruit fly life cycle (and why it matters)
Knowing how fruit flies grow helps you beat them.
- Eggs. A female lays eggs on the surface of ripe fruit or other wet, sweet things.
- Larvae. Tiny worms hatch in about a day and eat the food they are on.
- Pupae. After a few days, they form a shell and change into adults.
- Adults. About a week after the egg was laid, new adult flies come out. They can lay eggs within a couple of days.
This means that even after you clean up, eggs and larvae that are already there will keep turning into adults for about a week. Do not give up if you still see a few flies after a couple of days.
Step 1: Find and remove where they breed
Fruit flies lay eggs on wet, sweet, fermenting things. Check all of these places:
- Fruit and vegetables on the counter. Bananas, tomatoes, peaches, onions, and potatoes are common. Check the bottom of bags and baskets for anything soft or rotten.
- Your kitchen trash can, including under the bag and the inside of the lid.
- Recycling. Bottles, cans, and jars with a little juice, soda, wine, beer, or sauce left inside.
- Drains and garbage disposals. A slimy film of food builds up inside them.
- Sponges, dish rags, and mops that stay damp.
- Spills under the fridge, stove, or toaster, or in the bottom of cabinets.
- Pet food bowls left out all day.
- Compost bins kept in the kitchen.
Throw out overripe or damaged fruit and vegetables. Take out the trash. Rinse your recycling. Wipe up sticky spills.
Step 2: Clean your drains
The slime inside drains is a favorite place for fruit flies to lay eggs.
- Scrub inside the drain opening with a stiff brush and hot, soapy water.
- Pour half a cup of baking soda into the drain, then one cup of white vinegar.
- Let it fizz for 15 to 30 minutes.
- Flush it with very hot tap water.
If your pipes are plastic (PVC), use hot tap water instead of boiling water. Boiling water can soften plastic pipe joints over time. For garbage disposals, run them with lots of water and scrub the rubber flaps on top.
If you see small, fuzzy flies near the drain instead, they may be drain flies or fungus gnats. Our guide on getting rid of gnats and drain flies explains how to deal with them.
Step 3: Set traps for the adult flies
Traps catch the flies that are already flying, so they cannot lay more eggs. Here are the best homemade traps.
Apple cider vinegar trap (the best DIY trap)
- Pour about an inch of apple cider vinegar into a jar or glass.
- Add 2 or 3 drops of dish soap. The soap breaks the surface of the vinegar, so the flies sink instead of landing and leaving.
- Cover the top with plastic wrap and hold it on with a rubber band.
- Poke a few small holes in the plastic with a toothpick.
- Put the trap where you see the most flies.
- Replace the vinegar every few days.
Wine or beer trap
Leave a little red wine or beer in the bottom of a bottle. The narrow neck makes it hard for the flies to get out. This works because fruit flies love the smell of fermentation.
Fruit and paper cone trap
- Put a piece of very ripe fruit, like a banana slice, in a jar.
- Roll a piece of paper into a cone with a small hole at the tip.
- Put the cone in the jar with the small end pointing down.
Flies can find their way in through the hole, but it is hard for them to find their way out.
Store-bought traps
Sticky traps and ready-made fruit fly traps work too. Keep sticky traps away from where you make food.
Why do I have fruit flies but no fruit?
It can be confusing to see fruit flies when there is no fruit in the house. But fruit flies will breed in anything wet and sweet, not just fruit. Check these hidden spots:
- The bottom of your trash can, under the bag, where juice can collect
- Your recycling bin, especially wine bottles, beer cans, and juice boxes
- Under the fridge or stove, where a spill may have rolled out of sight
- The fridge drip pan, a tray under many fridges that collects water
- A mop or sponge that stays wet
- A forgotten bag of potatoes or onions in the pantry
- Your kitchen drain or garbage disposal
- A pet's food bowl or a bag of pet food that is left open
Fruit flies in the bathroom or bedroom usually come from a drain, a trash can with food wrappers or drink cups, or a houseplant.
Once you find and clean the hidden source, the flies will stop coming back.
Step 4: Keep going for two weeks
Even after you remove what they breed in, eggs and larvae that are already there will keep hatching. So:
- Keep your traps out and refill them every few days.
- Keep fruit in the fridge and the counters clean.
- Take out the trash often.
- Keep this up for one to two weeks, until you see no new flies for several days.
Do fruit fly home remedies really work?
You may have heard of other ways to get rid of fruit flies. Here is what works and what does not.
| Method | Does it work? | Notes |
|---|---|---|
| Apple cider vinegar + dish soap | Yes | The best DIY trap for most homes |
| Red wine or beer in a bottle | Yes | Good backup if you have no vinegar |
| Rotten fruit in a jar with a cone | Yes | Works well, but it smells bad |
| Plain vinegar with no soap | Sometimes | Flies can land and fly away |
| Bug spray | Short term only | Kills adults but not eggs; avoid near food |
| Essential oil sprays | Not proven | May cover smells but will not stop breeding |
| Bleach down the drain | Not really | Flows past the slime too fast; scrubbing works better |
How to keep fruit flies from coming back
Once the flies are gone, these habits keep them away:
- Put ripe fruit in the fridge, or buy smaller amounts more often.
- Wash fruit and vegetables when you get home from the store.
- Take out food trash every day or two in warm weather, and keep the lid closed.
- Rinse bottles and cans before you put them in recycling.
- Wring out and dry sponges and dish rags, and replace them often.
- Wipe counters every night.
- Clean your drains once a week.
- Fix holes in window screens.
A clean kitchen is much easier to keep pest-free. Our simple weekly cleaning routine can help you stay on top of it.
Is it really fruit flies?
Other small flies look a lot like fruit flies, but they need different fixes.
| Fly | What it looks like | Where it breeds | How to get rid of it |
|---|---|---|---|
| Fruit fly | Tan body, red eyes, round | Ripe fruit, trash, spills | Remove food; vinegar trap |
| Drain fly | Fuzzy, gray, wings like a tiny moth | Slime inside drains | Scrub and clean drains well |
| Fungus gnat | Dark, thin, long legs | Wet soil in houseplants | Let soil dry out; yellow sticky traps |
If you have plants and the flies come up when you water them, they are likely fungus gnats. Follow our full guide on how to get rid of gnats in your house.
Can you get rid of fruit flies overnight?
You can catch a lot of adult fruit flies overnight with a few vinegar traps. But you cannot get rid of all of them in one night, because eggs and larvae that are already there will keep hatching for several days. The fastest way to clear them is to remove every breeding spot on day one, set two or three traps, and keep going for one to two weeks.
When to call pest control
Most fruit fly problems can be solved at home. Call a pest control company if:
- You still have lots of flies after two or three weeks of these steps
- You cannot find where they are coming from
- You run a business kitchen or food shop
- You think the flies are breeding in a hidden spot, like under a floor or behind a wall
The bottom line
To get rid of fruit flies, remove what they breed in and trap the adults at the same time. Throw out old fruit, take out the trash, rinse your recycling, and clean your drains. Set an apple cider vinegar trap with a few drops of dish soap. Keep going for about two weeks, and keep ripe fruit in the fridge so they do not come back.
Frequently asked questions
Where do fruit flies come from?
Fruit flies come in from outside when they smell ripe or rotting food. Their eggs can also come home on fruit and vegetables from the store. Once inside, they lay eggs in anything wet and sweet, like old fruit, trash, drains, and spills.
How long does it take to get rid of fruit flies?
Plan on about one to two weeks. A fruit fly can grow from an egg into an adult in about a week at room temperature. So new flies can keep showing up for a while after you remove what they breed in. Keep your traps out until you see no flies for several days.
Are fruit flies harmful?
Fruit flies do not bite. But they can carry germs from trash and drains onto your food and counters. Throw away food they have been on, and keep your kitchen clean.
What is the best bait for a fruit fly trap?
Apple cider vinegar with a few drops of dish soap works best for most people. Red wine, beer, and very ripe fruit also work well. The soap is important, because it makes the flies sink instead of landing on top and flying away.
Written by
Agha Ali Abbas
Agha Ali Abbas is the founder and editor of TimeToNote. He researches and writes practical guides to everyday problems, checking each fix against manufacturer documentation and reputable sources before publishing.
Related guides

Everyday Solutions
How to Get Rid of Gnats in Your House Fast (and Keep Them Away)
Gnats in your house? Find out which kind you have, trap the adults, and kill the eggs in plant soil and drains with simple, safe methods that really work.
10 min read

Home Problems
How to Clean a Dusty House: An Easy Step-by-Step Method
Clean a dusty house the right way: top to bottom, dry to wet, with tools that trap dust. Includes a room-by-room checklist and a simple weekly routine.
8 min read

Everyday Solutions
How to Remove Sticker Residue From Any Surface (Easy Methods)
Get sticky label glue off glass, plastic, wood, metal, clothes, and cars with things you already have at home, like oil, rubbing alcohol, and warm soapy water.
8 min read