How to get rid of fruit flies
About 7 minutes to read. Published . By the House & Hedge team.

A cloud of small flies over the fruit bowl feels like an invasion, and the instinct is to reach for a spray. The extension services that publish on the subject agree on something else. The flies you see are the ones that have already hatched, and the ones that matter are the larvae in the damp, rotting or fermenting material that you cannot see. A trap or a spray removes adults and leaves that material in place. Clear the breeding site and the flies run out. This guide is the order to do that in: confirm what you have, find the sources, check the drains, trap what is left, and leave sprays until last.
Confirm that they are fruit flies
The University of Kentucky describes the adult as about 1/8 inch long, usually with red eyes, and tan at the front of the body and black at the rear. Iowa State University Extension gives the size as 1/4 inch, so the sources differ by a factor of two. Do not rely on the number. Use the other signs: red eyes, a tan front and a dark rear, and flies that gather at windows and sinks, which Iowa State says is because they are drawn to light and moisture.
The University of Kentucky says they appear in kitchens most often in late summer and fall, when fruit is ripening. Iowa State University Extension adds that fruit need not be present at all.
Two other small flies are easy to mix up with them. Fungus gnats hover around the soil of houseplants, and the guide to fungus gnats covers them. Neither extension source separates fruit flies from other small flies that breed in drains, so if the flies come only from a drain, treat the drain as the breeding site whatever they turn out to be, and follow the drain steps below.
Where they come from
The University of Kentucky lists these sources:
- Ripe or fermenting produce, including tomatoes, melons, squash and grapes, as well as bananas, potatoes, onions and any unrefrigerated produce from a store.
- Drains, garbage disposals, empty bottles and cans, trash containers, mops and cleaning rags.
- Forgotten rotting produce, juice spilled under a refrigerator, and an unemptied basement recycling bin.
- Home-canned foods and homemade wine, cider or beer in containers that are not well sealed.
- Overripe produce already infested when it came into the house, and adults coming in through poorly screened windows and doors.
Iowa State University Extension adds the damp film in drains. Its list includes rarely used sinks, tubs, showers and floor drains with a slimy film above the waterline, damp areas under leaking pipes and refrigeration equipment, garbage containers and discarded bottles and cans.
The University of Kentucky says a female can lay about 500 eggs, near the surface of fermenting food or other moist organic material, and that the whole cycle from egg to adult can take about a week. That is why numbers can seem to double overnight and why a source you miss keeps the flies coming.
Step one: remove the breeding sites
The University of Kentucky is blunt about it: all potential breeding areas must be located and eliminated. Walk the kitchen and the rooms around it with this list.
- Produce. Eat, discard or refrigerate produce once it ripens. If an item has a damaged area, cut it out and throw it away.
- Bins. Empty and wash the trash can and the recycling bin. Take out the bag, and wipe the rim and lid, where juice collects.
- Bottles and cans. Rinse them before they go in the recycling, and do not let them stand open.
- Spills. Look under and behind the refrigerator and the stove for spilled juice, and wipe the shelves of the fridge.
- Cloths and mops. Wash or replace damp sponges, rags and mops. The University of Kentucky names mops and cleaning rags as sources.
- Containers. Seal anything used for canning, wine, cider or beer.
- The pantry. Check onions and potatoes, and anything that has been forgotten at the back.
Wash what you can with hot water and soap, and let it dry. The aim is no damp, sugary or rotting material anywhere flies can reach.
Step two: check the drains
Drains are the source people miss. Iowa State University Extension says fruit flies can breed in a slimy film inside a drain, and the University of Kentucky says to check a drain or disposal by taping a clear plastic food storage bag over the opening overnight. If adults appear in the bag, the drain is a breeding site.
If it is, clean it.
- Scrub the inside. Iowa State advises scrubbing the inside of a slow drain with a stiff brush or similar tool to remove the organic build-up. The aim is to clean the inside of the drain pipe and so eliminate the organic matter.
- Rinse with force or heat. For drains that cannot be scrubbed, Iowa State suggests rinsing with high-pressure water or slowly pouring boiling water down the sides of the pipe.
- Use a bacterial drain product that breaks down organic matter, as the label directs. Iowa State lists these as an option.
- Skip bleach and ammonia. Iowa State says there is no benefit to treating drains with bleach or ammonia.
Check again with the bag after a day or two. If flies still come out, scrub again or have a plumber look at the pipe.
Step three: trap the adults
A trap does not solve the problem, but it brings the number down while the sources are going. The University of Kentucky gives this one:
- Roll a sheet of notebook paper into a funnel.
- Set the funnel in a jar, point down.
- Put a few ounces of cider vinegar in the jar. A slice of banana also works.
- Place the jar wherever flies are seen.
The flies enter and cannot find the way out. The University of Kentucky says the trapped adults can be killed or released outdoors.
Step four: keep them out
Eat or refrigerate produce as it ripens. Seal the containers used for homemade drinks. Fit windows and doors with tight-fitting screens; the University of Kentucky says 16 mesh. Empty and clean the trash and recycling bins on a schedule, and clean up spills when they happen. Scrub the rarely used sinks, tubs and floor drains that Iowa State lists as breeding sites every so often, before a film builds up.
What about sprays?
The sources are cautious. Iowa State University Extension says household fly sprays can kill the adults present at the time, but that this is temporary relief at best, because a spray does not address the breeding source. The University of Kentucky says the problem will continue no matter how often insecticides are applied to control the adults, and that only after the breeding source has been eliminated may a pyrethrum-based aerosol be used to kill any remaining adults. It adds that its recommendations apply to Kentucky, and advises checking with a local county agent or regulatory official before you use a pesticide.
So a spray comes last, if at all, after the source is gone.
When to call a professional
Neither extension source says when to hire one, and this guide does not invent a rule. Iowa State notes that breeding sites can be hard to find and that perseverance and imagination will be required. If you have been through the whole list and checked the drains twice, and the flies are still there, two kinds of professional help might be worth it: a plumber, if the bag test shows a drain is the source and scrubbing has not cleared it or there is a leak under the sink, and a pest control company, to look for sources in places you cannot reach. For any pesticide, the University of Kentucky advises checking with a local county agent.
Safety if you do use a spray or a drain product
Read the label before you use any product, and follow it. The EPA’s advice is to “always read the label first and follow the directions to the letter, including all precautions and restrictions.”
- Children and pets. The EPA says to “remove children, toys and pets from the area and keep them away until the pesticide has dried.”
- Storage. “Store pesticides in their original containers.” The EPA warns that “Children and others have been poisoned by accidentally consuming pesticides stored in food or beverage containers.”
- Poison Control. The EPA’s advice is to “Keep the telephone number of your area Poison Control Center near your telephone: 1-800-222-1222.”
- Pets. If a pet may have swallowed a pesticide or a drain product, call a vet or an animal poison line at once. The numbers are in the guide on what to do if a pet eats a plant.
The University of Kentucky describes fruit flies mainly as a nuisance, but notes that they can contaminate food with bacteria and other disease-causing organisms. Throw out any food they have been feeding on. For the other flying pest that gets into the pantry, see the guide to pantry moths.


