How to Manage Pests

Pests of Homes, Structures, People, and Pets


Revised 5/15

In this Guideline:

PDF to Print

Adult houseflies, Musca domestica, mating.

Adult houseflies, Musca domestica, mating.

Face flies, Musca autumnalis, on the face of a steer.

Face flies, Musca autumnalis, on the face of a steer.

Stable fly, Stomoxys calcitrans, engorged after a blood meal.

Stable fly, Stomoxys calcitrans, engorged after a blood meal.

Adult female little house fly, Fanna canicularis.

Adult female little house fly, Fanna canicularis.

Green bottle fly,  Lucilia sp.

Green bottle fly, Lucilia sp.

Canyon fly, Fannia conspicua.

Canyon fly, Fannia conspicua.

Of the thousands of species of flies, only a few are common pests in and around the home. Some of the more common nuisance flies are the house fly (Musca domestica), the face fly (Musca autumnalis) , the stable fly (Stomoxys calcitrans) , the little house fly (Fannia canicularis) , and several species of blow flies (especially in the genus Lucilia). These pests breed in animal wastes and decaying organic material, including animal carrion and food waste from which they can pick up bacteria and viruses that may cause human disease.

All flies undergo complete metamorphosis with egg, larva, pupa, and adult stages in their development . The female fly deposits her eggs in animal feces, carrion or moist organic material where the larvae, or "maggots," complete their development, feeding on bacteria associated with their developmental site. The maggots will pass through three larval stages increasing in size with each stage. When the maggots have completed their development and are ready to undergo the next step in their metamorphosis, they convert their last larval skin into a puparium, a hardened shell within which the pupa develops. Within the puparium, the pupa transforms into an adult fly, which pops off the end of the puparium and emerges. Body fluids pump into the fly’s wing veins causing the wings to unfold and expand and allowing them to dry and harden so that the adult can fly. The rate of fly development is dependent upon temperature; and under optimal summertime conditions, flies may develop from egg to adult in as little as 7 days. Once the female fly has mated, she can lay several batches of eggs, typically containing over 100 eggs each.

While humans commonly find adult flies to be the most bothersome life stage, the larval stage is the best target for management efforts. Elimination of larval habitat is the preferred method of pest fly suppression. By removing material in which the larvae develop, the life cycle of the fly can be broken, preventing subsequent production of adult flies. While chemical pesticides may be effective for suppressing adult fly populations in some situations, they are not a substitute for proper sanitation and aggressive elimination of fly developmental sites. Flies can quickly develop resistance to insecticides and house flies are now resistant to many of the pesticides registered for their management. Use insecticides only as a last resort to obtain immediate control of adult flies.


Identification and Life Cycle

The house fly (Musca domestica) is a cosmopolitan companion of humans and domestic animals. House flies are generally found in greatest numbers during the hotter summer months. House flies are less than 3⁄8 inch in length and have four dark stripes down the back of their thorax. House flies have sponging mouthparts and eat solid food by first liquefying it with their saliva. House flies can also regurgitate onto a solid food to assist with the liquefying process.

Under favorable conditions, house fly numbers can increase quickly due to their rapid immature developmental time and the large number of eggs produced by each female—several batches of about 100 to 150 eggs. Eggs are laid in warm, moist, organic materials such as manure, garbage, lawn clippings, decaying vegetables and fruits, or soils contaminated with any of these materials. Larvae of the house fly are cream colored, have a blunt posterior end, and taper to a point at the head. Young larvae respond negatively to light and will burrow into the organic material in which they are developing. Older larvae respond positively to light and will emerge from their organic habitat to seek drier and cooler areas to transform into pupae. Under optimal summertime conditions, house flies can complete their development from egg to adult in as little as 7 days.


Because they have sponging mouthparts, house flies cannot bite; however, they may play an important role in disease transmission to humans and animals. House flies can carry a number of disease agents which they pick up while feeding on animal feces, animal body secretions, or kitchen waste and which they can deposit onto human foods following contact with or feeding on these human foods. House flies are known to carry bacteria and viruses that cause conditions such as diarrhea, cholera, food poisoning, yaws, dysentery, and eye infections. House flies can also cause nuisance to homeowners by their persistent attempts to land on human foods or even humans themselves (they will readily feed on animal sweat and other body secretions). House flies also leave dark fecal and regurgitation spots on wall surfaces where they rest, and with a preference for resting on light colored surfaces, these spots can be quite noticeable when fly numbers are high.

Management of House Flies

Flies found inside a building have entered from the outside in almost all cases. Therefore, barriers preventing access to the building are the first line of defense. Cracks around windows and doors where flies may enter should be sealed. Well-fitted screens will also limit their access to buildings. Outdoors, regular removal (at least once a week) and disposal of organic waste, including dog feces, rotting fruit, and kitchen waste will reduce the attractiveness of the area to adult flies and limit their breeding sites. Garbage should not be allowed to accumulate and should be placed in plastic bags and held in containers with tight-fitting lids where feasible. Garbage should also be placed as far from a building entrance as is practicable. In general, poor exclusion and lack of sanitation are the major contributors to house fly problems.

Sticky fly paper or ribbons are effective at eliminating a few flies in relatively confined areas but are not effective enough to manage heavy infestations or to provide control in an outdoor setting. Inverted cone traps containing fly food attractants can be readily purchased commercially and are effective when they are not competing with nearby garbage or animal wastes. The fly food attractants used in these inverted cone traps will be quite foul smelling, so the traps should be placed at some distance from occupied structures. Fly traps using ultraviolet light may be effective when used indoors where they are not competing with daytime sunlight. For control of just a few flies, the time-tested fly swatter is appropriate. Don’t use fly swatters near food preparation areas because they may result in contaminating food with insect body parts. Similarly, never use a "bug zapper" to kill flies near food preparation areas, as the insect body often explodes upon touching the wires and insect body parts can be propelled over several feet from the device.

Selective use of insecticides against house flies is one component of a total fly management program but should only be used after all possible nonchemical strategies have been employed. In most home situations, pesticides are not needed or recommended. Sanitation methods, along with screens to keep flies out of the home, should be sufficient. If sanitation efforts are not possible, a nonresidual pyrethrin aerosol may be used. Outdoors a professional pest control company can be hired to apply residual insecticides to surfaces such as walls and overhangs that flies tend to accumulate on when resting. Fly baits used in trash storage areas may be effective in reducing the number of adult flies, if proper sanitation practices are followed to prevent development of immature flies in the waste. However, when flies have access to garbage, baits alone will not control them.


Identification and Life Cycle

Little house fly (Fannia canicularis) is not tolerant of high daytime temperatures and is, therefore, generally most numerous during the cooler spring and fall months in California. As temperatures rise in summer, populations of Fannia diminish unless developmental sites are protected from temperature extremes.

Adults are approximately 2/3 the size of the house fly and lack the house fly’s distinctive thoracic stripes. Fannia at rest hold their wings directly over the back rather than holding the wings to form a V-shape as is typical for house flies. Flying aggregations of male Fannia typically form in areas with still air and protected from direct sunlight, such as breezeways and porch areas of residential homes. These swarms of males remain in continuous flight awaiting visitation by unmated females. Male swarms are often formed approximately 5 or 6 feet above the ground; just about head height for an adult human thereby maximizing their nuisance potential. Strong air currents tend to disperse these male aggregations.

Larval Fannia are adapted to tolerate a wide moisture range at their developmental sites, making them a particularly difficult nuisance fly to control. Egg laying and larval development frequently occur in animal wastes (especially poultry manure), but various moist organic materials, in particular fermenting grass clippings and compost, can serve as suitable substrates. A related fly, F. femoralis, can also be abundant in cooler coastal areas of California, but this species only rarely causes nuisance. Unlike house fly larvae, larvae of Fannia are brown in color, more flat than round, and have numerous fleshy spines. The developmental time from egg to adult is somewhat longer for little house fly than for the house fly at all temperatures.


Little house flies are more reluctant to enter homes than are house flies; instead, they tend to congregate in outdoor areas such as patios, entryways, and garages. As temperatures decline, they seek cover in buildings or protective vegetation. They seldom land on human foods and are not considered a significant carrier of human disease agents. However, their habit of hovering at human face height makes them annoying, though they move readily out of the way when approached.

Management of Little House Flies

As with all nuisance flies, eliminating breeding sites is the preferred method of controlling Fannia. Accumulations of manure (especially poultry) or other decaying organic matter are ideal developmental sites. These developmental sites must be removed, spread thin to fully dry, or properly composted with pile turning as the composted material undergoes heat cycles. Fannia are not attracted to the same fly baits or traps that collect house flies. Some relief can be obtained by placing strong fans in areas where male Fannia tend to swarm, as the increased air movement will make the site less attractive to them.


Identification and Life Cycle

Canyon flies (Fannia benjamini complex) are an emerging urban pest in California. These are native flies that have existed in western North America for a very long time. There are seven related fly species within this complex, which collectively are called "canyon flies" due to their geographic association with natural canyons, particularly those within coastal and inland mountain ranges where oak trees dominate the landscape. While distantly related to the other Fannia flies mentioned above, these flies do not appear to develop in animal feces or fermenting green waste. Our best guess at present is that these native flies develop on moist decaying plant matter or leaf litter. However, one canyon fly species (F. conspicua) has become quite problematic in Southern California in recent years following the introduction of an exotic succulent ground cover plant called red apple (Aptenia cordifolia) which was first introduced into the United States in the mid-1980’s and is now widely planted in hillside communities for erosion control and fire protection. The decaying understory of red apple has proven to be an excellent developmental site for this fly species and canyon fly numbers can become incredibly problematic in communities where this plant is common.

Adult canyon flies are similar in size to the little house fly but can be distinguished from other flies by their three-spotted abdomen and yellow coloration at the base of their antennae.

Like other Fannia flies, canyon flies are not tolerant of high temperatures and adult numbers tend to peak from late spring through early summer, with a second peak in late fall. Their daily activity is also restricted by temperature with activity generally limited to the cooler morning and evening hours during these seasonal periods of peak abundance. The life cycle of canyon flies is similar to other Fannia flies, and the larvae have the same general morphology—flattened body shape with fleshy spines.


Canyon flies feed on the body secretions of animals, such as tears, mucus, sweat, and blood from open wounds. Their persistent attempts to land upon the face and body of the host can result in considerable nuisance to humans. While they cannot bite or make a wound to feed upon blood, they do have small prestomal teeth on their mouthparts which they can use to scrape at mucous membranes around the eyes of animals to encourage production of tears or other eye secretions. These flies have been associated with the transmission of an eye worm to cattle.

Management of Canyon Flies

Adult canyon flies are very difficult to manage. Because these flies feed on animals, they are attracted to several odors associated with animals including carbon dioxide (CO2), a component of animal breath. Traps baited with carbon dioxide will readily capture at least one species of canyon fly (F. conspicua), but removal of these flies using CO2 traps has not proven sufficient to reduce their nuisance. The only successful strategy identified to date for management of these flies is removal of the red apple plant that serves as the developmental site for F. conspicua. For other canyon fly species that do not develop in red apple, there are no management strategies that have proven to be particularly successful. Application of insecticide by fogging vegetation bordering a residence has given some short term relief, but this type of management strategy is not recommended as it impacts many beneficial and benign insect species and typically only provides some management of canyon flies for a few days.


Identification and Life Cycle

Face flies (Musca autumnalis) are a problem particularly in rural areas of northern and coastal California where pastured cattle are present. The hotter, drier weather in inland Southern California and the southern San Joaquin Valley is not conducive to their development. Face flies require fresh cattle manure for development. The female face fly looks virtually identical to the house fly but male face flies have a distinctive orange-yellow colored abdomen. Like the house fly, it also has sponging mouthparts and cannot bite. However, face fly behavior is distinctive because they are specifically attracted to the eyes, nose, and mouth of cattle and horses.


Face flies feed on the eye and nose secretions of cattle and horses in the summer months. Their habit of feeding around the eyes makes them capable of transmitting pinkeye to livestock, and the face fly is a much more successful pinkeye vector than the closely related house fly. In late fall, large numbers of face flies may enter buildings or similar structures to hibernate through the winter months. On warm days, hibernating flies can become active resulting in nuisance to homeowners. When active, face flies are attracted to light, so they are frequently found flying inside homes near windows.

Management of Face Flies

To control adult face flies within the home, locate where the flies are hibernating (overwintering). Begin searching for hibernation sites on the southern and western sides of the building because in fall and winter these walls receive the most sun and, therefore, are usually the warmest parts of the building and attract the greatest number of flies. Face flies seeking shelter will often enter cracks and crevices that lead to structural voids within a building, such as crawl spaces, attics, or false ceilings. These structural voids may need to be inspected if adult face flies persist throughout the winter.

Flies can be vacuumed off the surfaces on which they are hibernating; in areas inaccessible to vacuuming, a residual insecticide such as a pyrethroid can be applied. For application of residual insecticides, contact a reputable pest control company. To prevent future infestations, cracks on the outside of the building structure that serve as entry points for flies should be sealed.

For most fly species, the best control is achieved by removing larval developmental sites. Because face flies develop in fresh, undisturbed cattle manure (intact manure pats), removal of larval developmental sites (i.e., removal of intact manure pats) may be very difficult and probably impractical in most circumstances. However, by increasing the density of cattle (generally accomplished by restricting their pasture area), the manure pats will be disturbed by the animals as they forage, allowing few flies to develop. Alternatively, removal of cattle from nearby fields or pastures may help to reduce the problem.


Identification and Life Cycle

The stable fly (Stomoxys calcitrans), sometimes called the "biting fly," is a common fly that attacks people living in neighborhoods where livestock (e.g., horses, cattle) or livestock facilities are present.

Stable flies typically appear in mid-late spring, become severe in early summer, and decrease in numbers throughout the remaining summer months when daytime temperatures are high. These flies are similar in appearance to house flies, except that stable flies have a bayonet-like mouthpart (proboscis) protruding from the front of the head; and they lack the four dark stripes on the thorax that are indicative of house flies.

Under optimal temperatures, the stable fly can develop from egg to adult in 12 days. In addition to developing in the manure of livestock, piles of moist, decaying plant material (e.g., grass clippings, hay, silage) are also potential sources of stable flies, especially when this material is mixed with animal manure and urine. Backyard compost piles can be ideal developmental sites for stable fly larvae and may serve as the production source for an entire neighborhood.


Both sexes of stable flies feed about once per day on the blood of animals (and sometimes people) and are known to give a painful bite. Although they are blood feeders and capable of transmitting some viruses, stable flies are not known to be significant carriers of disease agents in the United States. Stable flies prefer to feed on the legs and lower body of cattle, horses, and other large animals (including humans). On dogs or similar sized animals, stable flies typically feed around the periphery of the ears earning them another common name "dog flies." Undisturbed, a stable fly can fully engorge with blood in less than 5 minutes. Fully fed stable flies will move to a nearby resting site (e.g., a wall or fence) while the blood meal is digested.

Management of Stable Flies

The most effective and economical method for reducing stable fly numbers is to eliminate their developmental sites. To prevent larval development, moist grass clippings should be removed or incorporated into compost piles. Compost piles must be properly maintained to prevent them from becoming breeding areas for stable flies. Proper maintenance includes periodically turning the pile, which promotes internal heating of the pile and rapid decomposition of the organic matter within the pile.

To protect dogs and horses that are bothered by stable flies, insect repellents containing permethrin or pyrethrins are effective but neither provides long-term control; repeated applications every other day are necessary. Because the stable fly season is relatively short (late spring through early summer), this chemical repellent approach may be the most economical method to control stable flies on companion animals.


Identification and Life Cycle

Blow flies are a group of fly species with similar life histories and behaviors. Adult flies in this group can be readily differentiated from other flies discussed in this publication by their coloration, which is a shiny, metallic green or blue often mixed with some copper color. The term "blow fly" comes from the association of many of these fly species with carrion (dead animals) on which some species will deposit their eggs; however, in the urban environment the most common developmental site for these flies is in human food waste, though accumulations of pet waste may also produce these flies.

Under ideal temperatures, blow flies can develop from egg to adult in as little as 7 days. Similar to other nuisance flies, blow fly larvae leave their developmental site to seek out drier and more protected areas for pupation. Many homeowners have witnessed this behavior as a mass emergence of maggots crawling from their backyard trash cans when kitchen waste placed in these trash cans was not sealed in a plastic trash bag. Blow fly larvae and house fly larvae look and behave similarly, making identification difficult for the untrained.


Like house flies, blow flies have sponging mouthparts and do not bite or feed on blood. They are, however, strongly attracted to human foods and garbage, making cooking outdoors difficult where they are present. As with house flies, they may be involved in the transmission of disease agents acquired from garbage or animal feces and subsequently deposited onto human foods.

Management of Blow Flies

As with the other nuisance fly species, removal of larval developmental sites is the most efficient means of control. Household garbage and pet feces should be placed in plastic garbage bags and sealed before being deposited into trash containers outside the home. Garbage cans should be set out for pickup at least once each week, even if they are not full; because garbage that sits for more than one week is likely to produce adult blow flies. Finally, garbage cans should be regularly washed out with soap and water to remove any garbage residues that might attract blow flies or allow for their development.

Vertically hanging, sticky fly ribbons used to reduce adult house fly numbers will not work to control adult blow flies; unlike house flies, blow flies do not regularly rest on vertical surfaces. Adult blow flies can be controlled using odor-baited traps, as for house flies; but traps should be placed at some distance from the home or structure due to their foul odor.

Selective use of insecticides may be considered when sanitation measures fail to control fly problems. Fly baits used for control of house flies are not likely to provide good control of blow flies because the attractants present in fly baits were designed to attract house flies rather than blow flies. However, when placed on the ground surrounding trash containers, some control may be obtained.


Almost all nuisance fly species are best controlled by eliminating larval developmental sites and reducing adult attractants in the vicinity of buildings or other areas of concern. Attractive material (such as garbage cans) should always be placed at some distance from a building entrance; and barriers such as screens, doors, and air curtains should be used to prevent flies from entering buildings.

Chemicals are only rarely required for fly management in residential situations. Their use generally leads only to short-term control because they target adult flies, leaving immature developmental sites unchanged and available to produce the next generation of adult flies.



Gerry, A. C., B. A. Mullens, and N. G. Peterson. 2007. Predicting and Controlling Stable Flies on California Dairies (PDF). Oakland: Univ. Calif. Agric. Nat. Res. Pub 8258.

Loomis, E. C., J. R. Anderson, and A. S. Deal. 1980. Common Flies Associated with Livestock and Poultry. Oakland: Univ. Calif. Agric. Nat. Res. Leaflet 21142.

Moon, R. 2002. Muscid Flies (Muscidae). In G. R. Mullen and L. A. Durden, eds. Medical and Veterinary Entomology. San Diego: Academic Press. pp. 279–301.

Wall, R. and D. Shearer. 1997. Adult Flies (Diptera). In Veterinary Entomology. Chapman and Hall, London. pp. 159-166.


[UC Peer Reviewed]

Pest Notes: Flies

UC ANR Publication 7457         PDF to Print

Author: A. C. Gerry, Dept. of Entomology, University of California, Riverside.

Produced by University of California Statewide IPM Program

PDF: To display a PDF document, you may need to use a PDF reader.

Top of page

Statewide IPM Program, Agriculture and Natural Resources, University of California
All contents copyright © 2019 The Regents of the University of California. All rights reserved.

For noncommercial purposes only, any Web site may link directly to this page. FOR ALL OTHER USES or more information, read Legal Notices. Unfortunately, we cannot provide individual solutions to specific pest problems. See our Home page, or in the U.S., contact your local Cooperative Extension office for assistance.

Agriculture and Natural Resources, University of California

Accessibility   Contact webmaster.