Your guide to household and yard pests Urgent? When to call a pro
What bug is this?

How to Get Rid of House Flies

How to get rid of flies in your house: remove what they breed in, block entry, then trap, swat or spray the rest. Plus the vinegar trap and what fails.

nuisancedoes not biteleaves once you fix the cause updated October 15, 2026
Sticky fly ribbon with caught flies hanging under a porch ceiling and a bottle trap on a windowsill
Step 1
remove breeding source: trash, pet waste, compost
Step 2
screens, door sweeps, seal gaps
Step 3
fly tape, traps, swatter, or a spray
Time to clear
1–3 days for adults if source removed
DIY cost
about $10–$40

Updated October 15, 2026. We added safety guidance: for each product, how dangerous it is for cats, dogs, kids, pregnancy, fish and birds, how to protect your household, and what to do if someone is exposed.

To get rid of flies in the house, first remove what they breed in (open trash, pet waste, compost, or a dead animal) and close the gaps they use to get in, then kill the ones already inside with fly ribbon, a swatter, or a quick pyrethrin spray. If you only do the last part, new flies replace the dead ones within days.

House flies breed outdoors and in garbage, not in your walls, so control is mostly about sanitation and screens. UC IPM puts it bluntly: flies found indoors almost always came from outside, and poor exclusion and poor sanitation are the main causes of fly problems. Here is the order that works.

Step 1: Identify the fly

This plan is for house flies (1/4 inch, gray, four stripes on the back) and their larger relatives, blow flies. If yours are different, use the right guide:

  • tan with red eyes, around fruit → fruit flies
  • tiny and black, near houseplants → gnats
  • fuzzy and moth-like in the bathroom → drain flies
  • slow, clumsy flies on fall or winter windows → cluster flies
  • large, shiny green, blue, or black flies concentrated in one room → probably a dead animal; see Step 2

Not sure? Compare on the house flies page.

Step 2: Remove the breeding source

House flies lay batches of 100 to 150 eggs in warm, moist, rotting material, and in summer the maggots become adults in as little as a week. Extension guides call sanitation the mainstay of fly control, so start here:

  • Trash: use cans with tight lids, bag food waste, and take it out at least twice a week in summer (UC IPM's minimum is weekly). Rinse the can and lid monthly. Keep bins as far from doors as practical.
  • Pet waste: pick up dog waste daily; scoop litter boxes daily.
  • Compost: keep it covered, bury fresh scraps under brown material, turn it regularly, and do not add meat. Unturned piles and wet grass clippings also breed biting stable flies.
  • Food: do not leave pet food out; clean up grill grease and spills.
  • Dead animal: a sudden swarm of big blow flies in one room points to a dead mouse, rat, or bird in a wall, ceiling, attic, or crawl space. Follow the flies and the smell (there may be none), remove it if you can reach it, and vacuum up any maggots or brown pupal cases nearby. If you cannot reach it, the flies stop on their own once the last pupae hatch, usually within one to two weeks.
Compost bin with a closed lid and a covered kitchen scrap bucket in a backyard
Closed lids on compost and trash are the cheapest fly control there is.

Step 3: Keep flies out of your house

  • Repair torn screens and fit screens on every window you open. Standard 16- to 18-mesh window screen keeps house flies out.
  • Add door sweeps and weatherstripping.
  • Close gaps around window AC units, dryer vents, and pipes.
  • Keep doors closed, especially near the grill or trash area; a self-closing screen door or a magnetic mesh curtain helps on doors that open constantly.
  • For cluster flies, seal attic, soffit, and siding gaps in late summer, before they move in. The University of Kentucky notes window screens do not stop them because they enter through tiny gaps in the walls.
Hands pressing a new screen spline into a window frame to repair a torn window screen

Step 4: Kill the flies already inside

MethodBest forNotes
Fly swatter / electric swattera few fliescheap and works; not over food prep areas
Fly ribbon (sticky tape)garages, porches, kitchensUC IPM: effective for a few flies in confined spaces, not heavy infestations
Window sticky trapsflies gathering on glassgreat for blow flies and cluster flies, which head to light
Vacuumsluggish cluster flies, blow flies on windowsempty the canister outside
Enclosed UV trap with glue boardkitchens, continuous low numbersworks indoors where it is not competing with daylight
Pyrethrin aerosolmany flies at oncefast knockdown, no lasting effect; follow the label

Blow flies rarely land on vertical surfaces, so UC IPM notes that hanging ribbons catch few of them; put sticky traps on windowsills and flat surfaces instead.

Using spray safely. Indoor flying-insect sprays usually contain pyrethrins or synthetic pyrethroids. Remove or cover food, dishes, and pet bowls, keep people and pets out of the room until it airs out, and cover aquariums, because these chemicals are highly toxic to fish. Always follow the EPA-registered label; the label is the law. House flies have developed resistance to many insecticides, which is one more reason spraying alone tends to disappoint.

How dangerous are these products

Most fly control here is physical: swatters, ribbons, sticky and UV traps carry no chemical risk. The products with real risk are pyrethrin aerosols, and foggers and fly baits, which this page doesn't recommend as a main tool.

Comparison table

Fly ribbon, window and UV glue trapsActive ingredient: none
CatsCaution
cats can get stuck on low traps; hang them out of reach
DogsSafe
Kids, pregnancy, allergiesSafe
hang out of reach
Fish, birds, rodents, reptilesKeep out
small birds and lizards can get stuck
Pyrethrin aerosolActive ingredient: pyrethrins or pyrethroids, often with piperonyl butoxide
CatsKeep out
out of the room until aired out; 🔴 if the label lists permethrin, cypermethrin or phenothrin
DogsCaution
out during spraying
Kids, pregnancy, allergiesKeep out
out of the room until aired; spray mist triggers asthma
Fish, birds, rodents, reptilesDanger
extremely toxic to fish: cover tanks, turn off pumps; move birds out
Fly baits (granular or scatter)Active ingredient: varies, check the label
CatsCaution
place out of reach
DogsKeep out
dogs eat sweet bait; use stations out of reach
Kids, pregnancy, allergiesCaution
out of reach
Fish, birds, rodents, reptilesCaution
keep away from cages
Foggers (not recommended)Active ingredient: pyrethrins or pyrethroids
CatsDanger
DogsDanger
Kids, pregnancy, allergiesDanger
flammable; everyone out
Fish, birds, rodents, reptilesDanger
Essential oil spraysActive ingredient: peppermint, eucalyptus and others
CatsDanger
dangerous to cats
DogsCaution
Kids, pregnancy, allergiesCaution
can trigger asthma
Fish, birds, rodents, reptilesDanger
dangerous to birds
Safesafe to stayCautionkeep away during applicationKeep outkeep out until dry and aired outDangerserious danger, don't use around them

Aerosols

Spray in short bursts in an empty room, then close it for the time on the label and air it out before anyone returns. Cats and birds are the most sensitive: cats can't break down some pyrethroids, and birds' lungs take in anything in the air. Cans are flammable, so keep them away from pilot lights and stoves.

Fly baits

Baits are sugary and attractive to dogs. Use them only in stations or places pets can't reach, and never scatter them where kids play.

If something goes wrong

  • On skin. Wash with soap and water. Tingling or numbness after a pyrethroid is common and fades within hours.
  • In eyes. Rinse with running water for 15 minutes; see a doctor if burning continues.
  • Swallowed. Don't induce vomiting. Call Poison Control at 1-800-222-1222 and have the product label in hand.
  • A pet ate it or acts strangely (tremors, drooling, vomiting, wobbling, seizures). Call your vet or the ASPCA Animal Poison Control Center at (888) 426-4435 right away, and bring the package.
  • Fish acting distressed (gasping at the surface, darting). Change a large part of the water and run a filter with activated carbon.

How to get rid of house flies with vinegar

A vinegar trap works best on fruit flies, but it catches some house flies too:

  1. Fill a jar with an inch of apple cider vinegar and a spoonful of sugar.
  2. Add one drop of dish soap so flies sink.
  3. Cover with plastic wrap and poke a few holes, or roll a paper funnel into the mouth.

For house flies, better homemade baits are a bit of overripe fruit or sugar water with a splash of fruit juice in a narrow-neck bottle. Outdoors, cone-shaped baited fly traps with a commercial lure work very well, but they smell strongly; UC IPM advises placing them well away from the house and notes they work only when they are not competing with nearby garbage or animal waste.

How to keep flies out of the yard and patio

  • Pick up dog waste daily and keep compost covered.
  • Hang baited traps well away from doors and seating (at the edge of the yard) so they pull flies away from people instead of toward them.
  • Use a box fan on the patio table; flies avoid steady airflow.
  • Clean grills and outdoor trash cans regularly.
  • If you have little house flies hovering in slow circles under a porch roof, they ignore house fly baits and traps; UC IPM recommends finding their breeding site (often manure, compost, or wet grass clippings) and using strong fans where they swarm.

What does not work

  • Bags of water with pennies: no evidence they repel flies.
  • Bug zappers: house flies are weakly drawn to UV, and UC IPM warns zappers scatter insect fragments over several feet; never use them near food.
  • Essential oil sprays and herb pots: at best a mild, short-lived effect.
  • Foggers: kill some flies but do nothing about the source, and leave residue on surfaces.
  • Baits alone: Nebraska and UC IPM both say fly baits fail when flies have access to garbage or waste.

What people who dealt with it say

  • The "clean house, still flies" mystery is usually a dead animal. In r/pestcontrol threads about sudden swarms of big black or green flies, the most common answer, and most common outcome, was a dead mouse in a crawl space, ceiling, or wall. People who put a sticky trap on the window where the flies gathered and waited saw the flies stop within a week or two. A pro's summary: there is no chemical treatment; once all the pupae hatch, it ends.
  • Expect waves. When the source is hidden, flies can come in batches a week apart until it is used up. Check under rugs, curtains, and anything lying on the floor for crawling maggots or brown pupal cases.
  • Exclusion pays off. The top answers in a big r/homeowners discussion of pest-free homes were sealing gaps and screens, taking kitchen trash out daily, and not leaving food out, with spraying a distant last.

How long it takes

If the source is gone and doors are screened, adults inside are gone in one to three days. Blow flies from a dead animal typically stop in 10 to 14 days. If flies keep appearing for more than two weeks, there is still breeding nearby: a hidden carcass, a neighbor's compost or dumpster, or pet waste in the yard.

When to call a professional

Call a pest professional if you cannot find the source, if there is a dead animal in a wall or crawl space you cannot reach, or if cluster flies come back every year. Pros can treat exterior siding and eaves before fall and set commercial-grade traps. A one-time service typically costs about $150 to $300 (approximate). Compare products in bug sprays.

FAQ

How do I get rid of flies in the house quickly?
Take out the trash and close the bin, shut doors and windows, then swat or vacuum the flies inside, or use a flying-insect aerosol with pyrethrins following the label. Hang fly ribbon where they gather. Most are gone within a day if nothing is breeding them.
How do I get rid of house flies with vinegar?
Put apple cider vinegar with a little sugar and one drop of dish soap in a jar, cover it with plastic wrap, and poke a few holes. It catches some house flies but works far better on fruit flies; for house flies, sugar water with fruit juice in a narrow-neck bottle, fly ribbon, and window traps catch more.
How do I keep flies out of my house?
Repair screens, add door sweeps, keep doors closed, keep lidded trash cans as far from doors as practical, pick up pet waste daily, and hang odor-baited fly traps at the edge of the yard, well away from doors, to pull flies away from the house.
What is the best way to kill house flies?
A swatter or electric swatter for a few flies, fly ribbon or sticky window traps for a steady trickle, and a pyrethrin aerosol for many at once. UC IPM notes that chemicals only give short-term control because they leave the breeding site intact.
Why do I keep getting flies even though my house is clean?
The source is often outside or hidden: an outdoor trash can near the door, a neighbor's compost or dog run, or a dead animal in a wall or crawl space. Big shiny flies in one room point to a carcass; they stop on their own in about 10 to 14 days.
Do bug zappers work on house flies?
Not well. House flies are only weakly drawn to UV light, and UC IPM warns that zappers spray insect fragments several feet, so they should never be used near food. Enclosed UV traps with glue boards are a better indoor option.
How do I get rid of small flies in the house?
Small flies are usually fruit flies, fungus gnats, or drain flies, which need a different plan from house flies. See the fruit fly, gnat, and drain fly guides.

Sources and real-world experience

Built from the expert sources and real discussions below — we read each one. How we research.

  1. UC IPM: Flies (Pest Notes)
  2. University of Nebraska-Lincoln Extension: House Fly Control Guide (G958)
  3. University of Kentucky Entomology: Cluster Flies, Face Flies, and Blow Flies in Homes (ENTFACT-624)
  4. University of Kentucky Entomology: Fruit Flies (ENTFACT-621)
  5. Reddit r/pestcontrol: Large black flies have suddenly appeared in my home
  6. Reddit r/pestcontrol: Sudden infestation of blowflies in house (green bottle fly)
  7. Reddit r/homeowners: How do so many people just have absolutely no bugs in their house?
Nothing working? When it is time to call an exterminator