Flies in the House: Find the Source, Then Get Rid of Them
Updated
Swatting and spraying won't fix a fly problem on their own. Every fly you see grew up as a maggot somewhere nearby, usually within a few hundred feet. In summer heat, a house fly can go from egg to adult in 7 to 10 days. If you kill the adults and leave the breeding spot alone, a new batch hatches next week.
That gives you the order of work for any fly problem:
- Work out which fly you have.
- Find where it's breeding and get rid of it.
- Keep new flies out.
- Kill the adults that are still around.
Most people skip to step 4 and wonder why the flies keep coming back.
Step 1: Work out which fly you have
People call everything "flies," but different flies have different causes. Look at one closely, either one that's resting on something or a dead one.
| What you see | Likely fly | Where it's usually coming from |
|---|---|---|
| Gray, about ¼ inch, four dark stripes on its back, buzzing around food and trash | House fly | Garbage cans, pet waste, compost, manure, rotting food outside or inside |
| Metallic green or blue, larger, loud buzz, a dozen or more show up suddenly indoors | Blow fly / bottle fly | Usually a dead mouse, rat, bird, or squirrel in a wall, attic, or crawlspace. Sometimes spoiled meat in the trash |
| Tiny, tan, red eyes, hovering around fruit or the kitchen sink | Fruit fly | Overripe produce, recycling bins, spills under appliances, drains |
| Tiny, fuzzy, moth-like, sitting on bathroom walls | Drain fly | Slime inside sink, tub, and floor drains |
| Slightly larger than a house fly, sluggish, gathering on sunny windows in fall and late winter | Cluster fly | Not breeding indoors. They spent the winter in your attic or wall voids |
This page is mostly about house flies, with notes on the others. If you have blow flies or cluster flies, read those sections below. Treating them like house flies doesn't work.
Step 2: Find and remove the breeding source
Female house flies lay batches of roughly 75 to 150 eggs in moist, rotting organic matter. The eggs hatch in less than a day. The maggots feed for about 4 to 7 days, then crawl to a drier spot to pupate. Adults usually live 2 to 4 weeks and keep laying eggs that whole time.
Check these places first, in this order:
- Outdoor garbage and recycling bins. This is the most common source by far. Lift the bag and check the bottom of the can for liquid and maggots.
- Pet waste in the yard, dog runs, and litter boxes.
- Compost piles and bins, especially if they have meat, dairy, or wet kitchen scraps.
- Indoor trash cans, particularly the gunk under the bag liner.
- Grass clippings and wet leaf piles that have been sitting a while.
- Spilled pet food, bird seed, or livestock feed.
- Manure if you have horses, chickens, or other livestock. It's the main fly source on rural properties.
- Behind and under the fridge, the dishwasher toe-kick, and the garbage disposal area.
What fixes it:
- Bag all food waste and tie the bags shut. Use cans with tight lids.
- Wash out garbage cans with hot soapy water, and do it every week in summer. Pour off the liquid at the bottom and let the can dry. If there are maggots, scrape them out, bag them, and wash the can.
- Have the outdoor can emptied at least weekly. If pickup is less often, keep the can in the shade and away from doors.
- Pick up pet waste daily during warm weather.
- Turn compost often and bury fresh food scraps under at least 8 inches of finished material, or keep meat and dairy out of the pile completely.
- Fix leaks and wet spots under sinks and around outdoor faucets.
Most house fly problems are solved by this step. Without it, nothing else will hold.
Step 3: Keep them out
House flies come in from outside. They follow food smells and warm air.
- Window and door screens: Standard 18×16 insect mesh stops house flies. Patch tears and replace screens that sag or have pulled away from the frame. One gap about the size of a pencil is enough for a fly to get through.
- Doors: Install door sweeps and keep doors closed. A busy back door propped open on a hot day lets in a lot of flies.
- Gaps: Seal around window AC units, dryer vents, plumbing, and cable entries with caulk or foam.
- Moving air: Flies avoid strong airflow. A box fan or an air curtain blowing outward over a door you use a lot keeps many of them from coming in. Ceiling fans over patios and outdoor eating areas also help.
- Outdoor lighting: Bright lights next to doors attract insects, and flies come with them. Yellow "bug" bulbs or lights placed away from the door help a little.
Step 4: Kill the adults
Once the source is gone and the openings are closed, deal with the flies that are left.
Indoors
- Fly swatter and vacuum. For a few flies, these are cheap, quick, and use no chemicals. A hand vacuum works well on flies sitting on windows.
- Plug-in UV light traps with glue boards. These are the right kind of light trap for indoors. The glue board holds the fly whole. Bug "zappers" break flies apart and spray fly pieces around, so don't use them in kitchens. Basic plug-in units with refills currently cost about $15 to $35. Commercial-grade units used in restaurants cost about $135 to $150, and a 12-pack of replacement boards costs about $45 to $50. Put traps low, about 3 to 5 feet off the floor, away from windows so they don't compete with daylight, and out of sight from outside. Replace the glue boards every 3 to 4 weeks, or sooner if they fill up.
- Sticky fly ribbons. They look bad but they work, especially in garages, barns, and sheds.
- Aerosol fly spray (pyrethrin or pyrethroid "flying insect" sprays). This is a quick knockdown for a room full of flies. It doesn't last. Cover or remove food, dishes, and pet bowls first. Keep pets, children, and fish tanks away. Air the room out afterward. Read the label and follow it. The label is the law for pesticide use.
Outdoors
- Bag or jar fly traps with bait. These use a fermenting attractant and catch large numbers of house flies. They also smell terrible. Hang them at least 20 to 30 feet from doors, patios, and windows, upwind if you can. If you hang one next to the back door, you'll draw more flies to your house.
- Granular or scatter fly baits (sugar bait mixed with an insecticide). Use them around dumpster pads, barns, and trash areas where flies gather. Keep them where children, dogs, and livestock can't reach. Some baits are labeled only for outdoor or non-residential use, so check before you buy.
- Residual sprays on surfaces where flies rest, such as the outside of trash enclosures, fences, and the sunny side of walls near doors. Flies rest on these surfaces and pick up the insecticide. Use a product labeled for flies and follow the label rates.
Homemade fly traps and repellents: what actually works
Homemade traps that work:
- Jar or bottle cone trap: Cut the top off a 2-liter bottle, turn it upside down, and set it into the bottom part like a funnel. For house flies, bait it with sugar water plus a piece of overripe fruit or a little meat scrap. For fruit flies, use apple cider vinegar with a drop of dish soap. Flies get in easily and have trouble finding the way out. Use these outdoors or in the garage for house flies.
- Apple cider vinegar + dish soap in a bowl: This is excellent for fruit flies and does very little for house flies.
- Fans: Cheap and effective at keeping flies off a patio table or a doorway.
Homemade repellents that mostly don't work:
- Bags of water with pennies: There's no solid evidence these do anything.
- Basil, mint, lavender, or other herb pots: They may have a small effect up close. They won't stop an infestation.
- Essential oil sprays (peppermint, eucalyptus, lemongrass, clove): Some repel flies briefly at very close range, but the effect lasts minutes to an hour. Essential oils are also toxic to cats and can irritate people with asthma. Don't diffuse them around pets.
- Cloves stuck in a lemon, cucumber slices, and similar tricks: These are folklore.
Repellents only change where the flies land. They don't reduce how many there are. If you still have a fly problem, there's still a breeding source to find.
Special cases
Sudden swarm of big shiny green or blue flies indoors
This is almost always a dead animal that maggots have fed on for about a week or two. The flies have now hatched and are coming out. Follow your nose to the strongest smell, and check:
- Attics
- Crawlspaces
- Wall cavities near the swarm
- Behind appliances
- Chimneys
- Under decks
Remove the carcass, bag it, and clean the area with an enzyme cleaner. Remove any maggots and pupae you find nearby. The flies stop within a few days once the source is gone. If the carcass can't be reached, the flies stop on their own once it has dried out, usually in 2 to 3 weeks. Kill the adults with light traps and a vacuum while you wait. Then figure out how the animal got in and seal that opening.
Slow flies on sunny windows in fall or late winter
These are cluster flies. Their larvae live in earthworms in the soil outside, so they never breed in your house. Adults crawl into attics and walls in fall to spend the winter and come out on warm days. Vacuum them up. Spraying inside the walls kills them in place, and the dead flies can draw carpet beetles. The real fix is sealing the outside in late summer: caulk around window trim, soffits, siding gaps, and vents. A professional exterior treatment applied in late August to September, before they move in, also works well.
Tiny flies in the bathroom or kitchen sink
These are drain flies or fruit flies. Insecticide doesn't solve either one. Scrub the inside of the drain with a stiff drain brush and use an enzyme or bio-gel drain cleaner for several nights in a row. Get rid of overripe produce and clean up sticky spills under appliances.
When to call a pro, and what it costs
Call a licensed pest control company if:
- You've removed every source you can find and still have flies after 2 weeks.
- You suspect a dead animal you can't reach or locate.
- You have livestock, a large property, or a commercial kitchen.
- Cluster flies come back every year.
A professional fly treatment for a home usually costs about $175 to $300. The national average is around $250 for a heavier infestation. A good technician spends most of the visit inspecting for the source: trash areas, drains, crawlspaces, and entry points. Then they apply residual and bait treatments outside, and sometimes add light traps indoors. If a company offers to spray the inside of the house without first looking for where the flies are breeding, get another quote.
Fly checklist: source, screens, traps, recheck
- [ ] Identify the fly: house, blow, fruit, drain, or cluster
- [ ] Wash out and dry the garbage cans, both indoor and outdoor
- [ ] Bag food waste and keep lids tight
- [ ] Pick up pet waste daily
- [ ] Manage or relocate the compost pile
- [ ] Repair screens and add door sweeps
- [ ] Use a UV glue-board trap indoors, not a zapper
- [ ] Hang bait traps outdoors, 20 to 30 feet or more from doors
- [ ] Recheck in 7 to 10 days, about one fly life cycle. If flies keep coming, there's still a breeding source to find.