We are reader-supported. When you buy through links on our site, we may earn an affiliate commission.
It’s never fun when you’re reaching for a banana, and suddenly, you see a swarm of fruit flies. These bugs are easy to handle when you spot only one or two, but you can’t break out your swatter when you have a full-fledged infestation. This issue requires an in-depth solution.
Here’s how to get rid of fruit flies with five tricks.
What Causes Fruit Flies?
If you pride yourself on having a super clean kitchen, you’re probably wondering how you could have an insect problem. But fruit flies, which look like small brown flies, don’t necessarily only hang out in soiled spaces. They prefer to target ripening fruits, but they are also drawn by the scent of decay, such as that produced by dirty drains and old garbage. They also love the scent of fermented fruit, hence the term barfly.
Fruit flies can lay 100 eggs per day, and they mature within 11-12 days after hatching, meaning they’ll soon have an exponential population if left unmanaged. Even when you eliminate their food source, they’ll still be present.
Temperature, Seasons and When to Use Fly Traps
Keep in mind that fruit flies thrive at room temperature, so they’ll continue reproducing in air-conditioned homes where a steady temperature can encourage them to breed. It’s most common for them to pop up in late summer and early fall, so you should be attentive around August, September and October. These months are the most popular due to the harvest season, when ripe fruit may come from the store with a few eggs already hidden on them.
If you suspect a small fly is lingering around your bananas on the counter, quickly pack the fruit into a bag in the fridge and leave out one of the traps recommended below. The sooner you catch the culprit, the less chance it has of leaving a legacy of eggs in a tucked-away corner.
Thankfully, you have several options to get rid of fruit flies permanently.
How to Get Rid of Fruit Flies in the House
When these fruit-hungry flies begin invading your space, you can rush to the store for a commercial trap, or you can sort it out with a few staples like these. As a bonus, these baits are equally attractive to gnats, which are smaller than fruit flies and can be as pesky. Simply add some dish soap to all your baits to ensure the gnats don’t escape through the entry points of your traps.
1. White Vinegar and Dish Soap
Fill a small bowl about halfway with white vinegar, which fruit flies are attracted to — it’s also used as a main ingredient in some commercial baits, proving its efficacy in attracting the pests. Add a little dish soap so that the fruit flies drown rather than float. Leave the dish uncovered on the counter for easy access. Feel free to place more than one bowl in different spots around your kitchen.
On the downside, this is a messy way to catch these pests, and you might accidentally knock a dish over, leaving you with a sour streak to clean up. If you’ve got pets or kids, you may want to use a different delivery method, which is where the covered trap comes in handy.
Simply use a tall glass and wrap some Saran Wrap over the top. Poke a few holes in that are large enough for the flies to squeeze through. The openings will also allow the scent to attract the pests. Flies go in, but they don’t come out.
2. Old Beer or Wine Bottles
There’s no denying that fruit flies love fermented drinks, so you can use the last few drops in a beer or wine bottle as a trap. Place the container on the counter, uncovered. This way, you’ll force the fruit flies into the bottle, and the narrow opening at the top will keep them inside. If you prefer, you can create a paper funnel, inserting the narrow end into the bottle to help the flies gain access and prevent them from escaping.
3. Apple Cider Vinegar With Plastic Wrap
If you’ve found that white vinegar doesn’t do the trick, you can choose apple cider vinegar instead. It’s sweeter, so and may be your particular fruit flies’ drink of choice. Add a little apple cider vinegar to a lidded paper cup. Secure the top of the cup with the lid or use some plastic wrap. Poke holes into the lid with a heated metal skewer or a pin if you used plastic wrap to give the fruit flies an entry point. This technique will leave no room for them to leave.
4. Overripe Fruit in a Jar
Here’s how to get rid of fruit flies while using up old fruit. Set a slice of overripe fruit and a few drops of white vinegar inside a jar. Secure some plastic wrap around the top, adding a few holes for a way inside. If you’d prefer, you could use a paper funnel instead. Either way, you should be able to trap and kill them.
5. Store-Bought Products
If you’d rather use chemical store-bought products, you have options. These products should be available at your local hardware store. Look for items like sticky strips, drain treatments, UV lights and pest sprays. Try DIY tricks first so that you don’t spend money unnecessarily.
To ensure the flies don’t escape the trap, you can add water and dishwashing liquid to the trap, helping the captured flies to drown within a few hours.
Fruit Flies in the Bathroom
Have you spotted fruit flies in your bathroom? If so, you can use a quick trick to kill the flies and their larvae altogether. These insects enjoy warm, moist spots, so you’ll frequently find them in shower drains, as well as in your kitchen.
Boil a pot of water. Then, carefully pour the solution down your shower drain to kill anything living inside. These bugs could also be sewer gnats, but the boiling water trick should eliminate most drain pests.
Other Points to Keep in Mind
Remember that both DIY solutions and store-bought products only address part of the problem. If you really want to get rid of fruit flies, you need to remove their food source. It’s crucial to:
- Keep sink drains clean and sanitized
- Store fruits and vegetables in the fridge – temperatures below 10 degrees Celsius or 50 degrees Fahrenheit denature eggs
- Wipe down counters frequently to remove spills
- Cork wine bottles
- Take the trash out frequently
- Remove all standing water and clean your pet’s drinking bowl daily
A Note on Repeat Treatments
When you don’t give the fruit flies a suitable environment to breed, you’ll have a fly-free life. Spray treatments only kill the adult fruit flies, while the eggs continue to hatch. These tricks can remedy any adult pests, but you’ll have to repeat several times to eliminate them as the eggs already there begin to hatch.
Complete elimination is difficult, but possible if you examine all fresh produce that enters your home. Wash it to remove any potential eggs and place it in the fridge, where the cold temperatures will prevent the remaining eggs from hatching. Clean your drains weekly with a good dose of boiling water.
If you still have these brown flies entering your home, it’s time to look in the immediate vicinity outside. Perhaps you have rotting leaves in a gutter near an open window or an outside drain that’s beginning to smell feisty? These are all breeding grounds for pests, mold, fungus and worms, so tidy up around the outside of your home to be sure you’re living your best pest-free life.
More Questions About Getting Rid of Fruit Flies
What Alternative Bait Materials Can I Use to Attract and Trap Fruit Flies?
Any fermenting material will attract fruit flies and gnats. Strawberries and bananas are popular choices, but orange peels also work. The trick is to get the bait to begin fermenting. You can add a bag of baking yeast to your trap to speed up the process, or leave a little beer in the sun before adding it to the trap.
How to Get Rid of Fruit Flies and Gnats?
A baited trap helps to eliminate the adults, but as the eggs already laid continue hatching, you may need to replace the traps frequently until all the eggs have hatched and you’ve caught the newly formed adults. Prevention is better than cure, so wash all fresh fruits and keep them in the fridge to avoid buzzing problems.
How to Get Rid of Fruit Flies in the Drain?
Boiling water is an effective way to remove fruit flies, but the eggs may remain in small crevices, so repeat the treatment weekly until no more flies remain. Alternatively, sprinkle half a cup of baking soda in the drain and add a cup of white vinegar, letting the fizzing action clear out pests before you pour in the boiling water.
Can I Use Bleach to Kill Fruit Flies?
While bleach will kill fruit flies, it’s highly carcinogenic and can cause serious respiratory issues for anyone with impaired lung function, such as someone with asthma. It’s not the best or most environmentally friendly method, so choose boiling water or vinegar instead.
How Do I Kill Fruit Flies Outdoors?
Outdoor pest management involves removing any place where they may nest or lay eggs. Clear out piles of rotting leaves or compost and sanitize outside drains. Check your yard weekly for signs of fruit flies or gnats in the warmer months, and at least monthly in winter.
Tips to Solve Your Fruit Fly Problem
There’s nothing more annoying than dozens of fruit flies swarming around your kitchen. Unfortunately, getting rid of them takes some planning and repeated treatment. These tricks help lessen their numbers, but you need to inspect your home and yard environment to ensure they don’t return once you’ve trapped them all.
What are your favorite fruit fly treatments? Please share your stories of success on our social channels.
Original publish date 01/25/2022 — Updated 07/28/2025