PestControlBasics
Menu
DIY guide

How to get rid of house flies in the house

House flies in the kitchen almost always flew in from outside. They breed in garbage, pet waste and other moist, rotting material, then follow odors through open doors and torn screens. Getting rid of them means closing the way in, removing what draws them, and picking off the few that still get inside.[1][4][7][6]

The short answer

  • Keep doors closed and screens in good repair. Flies found inside a building have entered from outside in almost all cases, and Texas A&M says house flies rarely breed indoors.[1][2][4]
  • Take away what attracts them: seal food waste and pet droppings in plastic bags, take the trash out at least once or twice a week, and rinse cans and bottles before they go in the bin.[6][7]
  • Kill the ones already inside with a fly swatter, flypaper or an indoor UV light trap. These handle a few flies; they won't keep up with a steady stream from a breeding site outdoors.[1][7][8]
  • A pyrethrin aerosol labeled for flying insects knocks down adults for a short time. It does nothing about the maggots, so the flies come back unless the source is found.[1][3][4]
  • If the flies keep coming, find where they are breeding outside. The guide to getting rid of flies outside covers trash cans, pet waste, compost and outdoor traps.[6][4]

Fly profiles on this site

Adult house fly on a white surface House Fly Musca domestica The house fly is a worldwide companion of people and domestic animals; it breeds in garbage, manure and other moist organic matter and is most numerous in hot summer months. Stable fly seen from above on painted siding, gray with a dark-striped thorax, a spotted abdomen and pointed mouthparts sticking out in front of the head Stable Fly Stomoxys calcitrans The stable fly, also called the biting house fly or dog fly, looks much like a house fly but feeds on blood. Cattle are its main hosts, but it also bites horses, dogs and people, especially in neighborhoods near livestock. Common green bottle fly, a metallic green blow fly, on a leaf Common Green Bottle Fly Calliphoridae (shown: Lucilia sericata) A sudden crowd of shiny green or blue flies indoors often means an animal has died in a chimney, wall or ceiling. Outdoors, most blow flies come from garbage with food waste and from pet waste. Cluster fly seen from above, showing golden hairs on the thorax Cluster Fly Pollenia species (e.g., P. rudis) Cluster flies gather on the sunny sides of buildings in fall to find places to overwinter and then appear indoors, often in large numbers, on warm days through winter and spring. They do not breed indoors. Adult face fly resting on netting, a dull gray fly with dark stripes on the thorax, reddish-brown eyes and clear wings Face Fly Musca autumnalis The face fly is a serious pest of pastured cattle that also invades homes and barns near pastures. In fall the adults look for sheltered places to spend the winter, often inside attics and wall voids, much like cluster flies. No photo yet Filth fly parasitoids Pupal parasitoid wasps, chiefly Muscidifurax raptor, M. raptorellus and Spalangia species Filth fly parasitoids are tiny wasps that lay their eggs in the pupae of house flies and stable flies, killing the developing fly. They occur naturally on most farms where flies breed, and several species are sold for release around barns, dairies, horse farms, feedlots and poultry houses as part of a fly control program.

Where indoor house flies come from

UC IPM and UC Riverside both say that in almost all cases, house flies seen inside a building have entered from outside, so keeping them out is the first line of defense. Texas A&M AgriLife Extension says house flies rarely breed inside structures but readily come in through open doors or unscreened windows, and are generally not an important indoor pest unless doors or windows are poorly screened or often left open.[1][2][4]

Outside, house flies lay their eggs in warm, moist organic matter: manure, garbage, lawn clippings, decaying fruit and vegetables, or soil mixed with any of these. Mississippi State Extension adds dog and cat feces to the list. The maggots crawl to a drier spot to pupate, and in summer the whole cycle can take as little as 7 days.[1][2][8]

Sources disagree on how many eggs a female lays. UC IPM and UC Riverside say several batches of about 100 to 150 eggs; University of Minnesota Extension says batches of 75 to 100; Texas A&M says 50 to 100 at a time and about 500 over her lifetime. Either way, a single trash can or pile of dog droppings can produce a lot of flies.[1][2][3][5]

Temperature sets the pace. Texas A&M says a house fly takes about 45 days to complete its life cycle at 60 °F but only 7 days at 95 °F, and Mississippi State says a generation can take 10 days or less under good conditions, with ten to twelve generations a year. That is why indoor fly problems peak in summer.[4][8]

The source may not be in your yard. Minnesota Extension says house flies can fly up to 20 miles but stay mostly within two miles of where they developed; Texas A&M says most stay within 1/2 to 1 mile. Nearby livestock, compost operations and poorly kept dumpsters can all supply flies to a neighborhood.[3][4]

Make sure it's a house fly

House flies are dull gray, about 1/6 to 1/4 inch long according to Minnesota Extension (UC IPM says less than 3/8 inch), with four dark stripes running lengthwise on the thorax. They have sponging mouthparts and cannot bite.[3][1][5]

Other flies call for different fixes, so check before you start. The types-of-house-flies guide covers each one.[4][6]

  • Tiny flies around fruit, drains or houseplants are fruit flies, drain flies, phorid flies or fungus gnats. Texas A&M says these can breed entirely indoors, so the source is inside the house.[4]
  • Sluggish flies on sunny windows in fall, winter or early spring are usually cluster flies or face flies coming out of the attic and walls, not house flies. Minnesota Extension says they shelter in buildings for the winter.[3][1]
  • A fly that bites your ankles looks like a house fly but is a stable fly, which has a bayonet-like beak sticking out from the front of its head.[1][3][5]
  • Metallic blue or green blow flies indoors, often with maggots, point to something dead. Texas A&M says blow flies and flesh flies inside indicate a home poorly sealed against wildlife, and suggests checking for a dead animal.[4][3]

Step 1: Keep them out

Screens and closed doors do most of the work. Mississippi State Extension credits the better exclusion that comes with air conditioning, modern sewage handling and fewer large animals near homes for the fact that most homes no longer see large numbers of house flies.[8][7]

  • Keep exterior doors closed when they aren't in use. Mississippi State says house flies will buzz inside any time a door or window is opened.[6][7]
  • Check screens for tears before opening windows for long periods, and make sure screens fit and are sealed. Minnesota Extension recommends 14- to 16-mesh screen on doors and windows.[7][6][3]
  • Seal cracks around windows and doors where flies can get in.[1][2]
  • Texas A&M suggests exhaust (blower) systems over doors and doors that open and close mechanically. Automatic air curtains are mainly used at commercial entryways.[5][4][1]
  • When house flies are thick outdoors, Texas A&M says a labeled residual insecticide sprayed at door entryways can reduce how many come in with foot traffic. Read the label: many now prohibit spraying pavement or surfaces that drain onto it.[4]

Step 2: Remove what draws them in

NPIC says that if you already take the trash out regularly, the flies may be developing outside and coming in after odors. Kitchen smells are what pull them through the door.[6]

  • Put food waste in plastic bags and seal or tie them, and use a trash can with a tight-fitting lid.[7][3][5]
  • Take the trash out at least once or twice a week, and more often in hot weather.[6][2]
  • Rinse cans, bottles and plastic containers before recycling or throwing them away.[6]
  • Don't leave dirty dishes in the sink. Mississippi State lists them as a potential breeding spot.[7]
  • Bag and seal pet droppings and dispose of them as soon as you can; NPIC says damp droppings can breed maggots. Clean up after indoor pets promptly.[6][7]
  • Fix leaking drains and garbage disposals, which attract several kinds of flies.[6]
  • Wash garbage cans regularly with soap and water and check under the liners for food residue.[3][5][4]
  • Keep outdoor garbage cans as far from doors as you can. NPIC says outdoor dumpsters should be at least 50 feet from kitchen doors and windows.[3][6][2]

Step 3: Find the breeding site outside

UC IPM, NPIC and Texas A&M all say the same thing: the larval stage is the best target, and removing the material maggots develop in breaks the cycle. Spraying adults without doing this gives only short-term control.[1][6][4]

Look for trash cans with food residue, pet waste in the yard, piles of grass clippings, rotting fruit and a compost pile that isn't managed. UC IPM recommends removing organic waste, including dog feces, at least once a week. The guide to getting rid of flies outside goes through each of these step by step.[1][4][3]

Killing the flies that get inside

Mississippi State Extension says that once flies are inside a home, a flyswatter or a UV light trap is the best control, and that non-chemical controls are preferred over insecticides indoors.[7][8]

  • Fly swatter: UC IPM calls it the right tool for just a few flies. Don't swat flies in food preparation areas, since body parts can land on food.[1][2][4]
  • Flypaper and fly ribbons: UC IPM says they work for a few flies in a fairly enclosed space but not for heavy infestations. Texas A&M suggests hanging them where air is still, within 6 feet of the floor, at about one 10-inch strip per 1,000 cubic feet, and says they last up to about 3 months or until covered. Minnesota Extension says to hang them out of reach of children and pets.[1][5][3]
  • Indoor UV light traps: these draw flies to a glue board or a low-voltage grid. UC IPM says they can work indoors where they don't compete with daylight. Mount them where they can't be seen from outside; Texas A&M AgriLife gives a height of 4 to 6 feet, the usual flying height of house flies, and suggests keeping them at least 15 feet from doors, out of bright light, and at least 5 feet from food preparation. Replace the bulbs once a year, ideally each spring, because UV output fades.[1][4][5]
  • No outdoor bug zappers indoors. Texas A&M says high-voltage zappers scatter insect fragments, and UC IPM warns that pieces can be thrown several feet, so never use one near food preparation.[4][1]

Sprays and fly baits: what they can and can't do

UC IPM says that in most homes pesticides are not needed or recommended, because screens and sanitation should be enough. When sanitation isn't possible, a nonresidual pyrethrin aerosol may be used. Minnesota Extension says an aerosol labeled for flying insects, such as pyrethrin or tetramethrin, is a short-term fix that won't solve an ongoing problem.[1][3]

Texas A&M AgriLife Extension agrees that once breeding areas are cleaned up you shouldn't need insecticides, though a flying-insect aerosol can knock down the flies left over.[4]

Fly baits are usually sugar-based, with an insecticide the flies eat. UC Riverside says to place them in garbage collection areas or other spots where flies gather, and UC IPM says that where flies can reach garbage, baits alone won't control them. Texas A&M warns that some baits can be toxic to pets.[5][2][1][4]

Resistance is the other limit. UC IPM says house flies are now resistant to many registered insecticides and can develop resistance quickly, and NPIC says the same. Use sprays only for immediate relief, follow the label, and NPIC suggests trying a lower-toxicity product first.[1][6]

What doesn't work

Mississippi State Extension says hanging bags of water with a coin in them over doors does not keep flies away, and that homemade fixes like it don't work. Bug zappers indoors spread fly parts (see above), and spraying adults while the breeding site keeps producing flies gives only short-term control.[7][4][1]

Why house flies are worth controlling

House flies feed on garbage and feces, then land on food. UC IPM says they are known to carry bacteria and viruses that cause diarrhea, cholera, food poisoning, dysentery and eye infections. Texas A&M says they are thought to carry more than 100 diseases, and Mississippi State notes that finding a pathogen on a fly doesn't always mean the fly can spread it, though house flies are proven carriers of food-borne illness.[1][4][8]

They also leave dark fecal and regurgitation spots where they rest, especially on light-colored surfaces.[1][3]

Common questions

Why do I have so many house flies in my house all of a sudden?
Usually because a new breeding site appeared outside, such as a trash can that wasn't emptied, pet waste or rotting fruit, and the flies are getting in through an open door or torn screen. In hot weather a new generation can appear in about a week.[1][6][4]
Do house flies breed inside the house?
Rarely. Texas A&M says house flies rarely breed indoors; they come in from outside. Small flies that keep appearing indoors are more likely fruit flies, drain flies, phorid flies or fungus gnats, which can breed inside.[4]
What kills house flies indoors?
A fly swatter, flypaper or an indoor UV light trap for a few flies, and a pyrethrin aerosol labeled for flying insects for short-term knockdown. None of these stop new flies unless the breeding source is removed.[1][7][3]
How long do house flies live?
Minnesota Extension says female house flies live three or four weeks; Texas A&M says adults live up to three weeks.[3][4]
Do house flies bite?
No. House flies have sponging mouthparts and cannot bite. A fly that bites around the ankles is probably a stable fly.[1][3]

Photo credits

Sources

  1. University of California Statewide IPM Program, “Flies (Pest Notes).” ipm.ucanr.edu/home-and-landscape/flies/ (accessed 2026-11-10)
  2. University of California, Riverside, Veterinary Entomology, “House Fly (Musca domestica L.).” www.veterinaryentomology.org/house-fly (accessed 2026-11-10)
  3. University of Minnesota Extension, “Flies.” extension.umn.edu/garden-and-home/home-maintenance/household-insects/flies (accessed 2026-11-10)
  4. Texas A&M AgriLife Extension Service, “Indoor Flies and Their Control.” agrilifeextension.tamu.edu/library/insects/indoor-flies-and-their-control/ (accessed 2026-11-10)
  5. Texas A&M AgriLife Extension Service, Disaster Assessment and Recovery, “Controlling Houseflies.” texashelp.tamu.edu/controlling-houseflies (accessed 2026-11-10)
  6. National Pesticide Information Center, “Flies.” www.npic.orst.edu/pest/flies.html (accessed 2026-11-10)
  7. Mississippi State University Extension Service, “How to Control Flies in Your Home.” extension.msstate.edu/blogs/extension-for-real-life/how-control-flies-your-home (accessed 2026-11-10)
  8. Mississippi State University Extension Service, “House Fly, Bug's Eye View Vol. 7, No. 18.” extension.msstate.edu/newsletters/bugs-eye-view/2021/house-fly-vol-7-no-18 (accessed 2026-11-10)

Updated 2026-11-10. Built from sourced records. Spot an error? Tell us.