Drain fly with grey fringed wings shown from below on a blue background.
Pests in the Urban Landscape
Article

Nuisance Flies in the Home

In California, flies are often a nuisance during summer and fall. Several species of flies commonly enter homes, and while most are merely nuisance pests, others can transmit diseases. These nuisance flies vary in their habitat preference and breeding cycle. In this article, we discuss a few common flies you might find around the home, in the kitchen, bathroom, and even around houseplants.  

Adult fungus gnat caught in yellow sticky trap
Adult fungus gnat. Credit: Jack Kelly Clark 

Some common nuisance flies and their habitats 

Filth-breeding flies like house flies and blow flies develop in compost, animal waste, dead animals, and garbage. These flies are commonly contaminated with bacteria, including those associated with food poisoning and can spread disease when landing on food. 

Fruit flies, also called vinegar flies, lay their eggs in overripe, rotting fruit. As adults, these small flies are commonly seen flying around open areas where ripe fruit is stored. 

Drain flies, also called moth flies and sewer flies, live in sink and sewer drains in their larval stage. The adult female flies lay eggs on the slimy organic matter that builds up inside drains where the larvae then feed. 

Fungus gnats develop in soil as larvae. They can be found indoors breeding in potting media used for houseplants or hovering near windows. 

Drain fly with grey fringed wings shown from below on a blue background.
Adult drain fly. Credit Joseph Berger, Bugwood. 

Fly life cycles 

The life cycle of flies is similar, but their breeding times and food preferences vary by species. In general, after breeding, female flies lay eggs which hatch into larvae (maggots) that feed on their preferred food sources. Once mature, the larvae migrate in search of a place to pupate (the resting stage where the larva is transformed into an adult insect). Adults emerge from the pupae to breed and feed. The entire life cycle is often completed in 7 to 14 days but depends on fly species and environmental conditions. 

Managing flies 

The best way to manage flies and prevent future infestations is to focus on exclusion, sanitation practices, and habitat modification that removes fly breeding sites and attractive conditions.  

  • Remove or cover garbage and clean up spilled animal feed, manure, and pet waste.  

  • Remove and dispose of overripe fruit that is attracting fruit flies. Wash the area with soapy water. 

  • Drain flies can be managed by removing the organic matter in drains with a hard bristle brush. 

  • Fungus gnats thrive in overly moist potting soil. Let the soil surface of potted plants dry out between waterings or water plants from the bottom using saucers.  

  • Indoor fly problems can be managed by keeping them out with screening and other exclusion techniques. Caulk, screen, or cover all small openings into a home to prevent flies from entering.  

Two yellow pieces of paper on a green stick in the potted soil of a green houseplant with sword-shaped leaves outlined in yellow.
Yellow sticky cards can be used in potted houseplants to monitor for fungus gnats and other pests. Trapping the adults decreases the number of the pests. Credit: Krystle Hickman, UC IPM

Traps

Several types of traps for flies are also available and can supplement other control methods. Fly paper and electrocution light traps can kill flies but are effective only in areas where exclusion and sanitation efforts have already reduced the fly populations to low numbers. Single flies can be easily killed with a flyswatter. 

Various food-based traps are also available. These traps often contain a protein or sugar-based bait, sometimes with the addition of a fly pheromone (sex attractant). As with other traps, they should be used along with sanitation and exclusion. These traps are effective for species that breed on dead animals and garbage, such as blow flies and house flies and should be placed near the highest concentration of flies. Yellow sticky traps can be placed in houseplant pots to trap fungus gnats, reducing their numbers. 

Several house flies caught on a strip of fly paper.
House flies caught on fly paper. Credit: Larry Strand, UC IPM.

Pesticides  

Pesticides are also available for fly control but are usually only a temporary solution, so should be used with prevention, sanitation, exclusion, and trapping. 

For more details about the nuisance flies described here and how to control them, see the Home and Landscape section of the UC IPM website . Look for the fact sheets in the Pest Notes section on Flies, Fruit Flies, Fungus Gnats, and Moth or Drain Flies. 

[Originally featured in the Summer 2026 edition of the Home & Garden Pest Newsletter.]