The short answer
When a group of flies suddenly appears indoors, it usually means one of two things. Either a batch of flies has just hatched from something they were breeding in, often inside or close to the house, or flies that were hiding in your walls or attic have become active. A dead animal, forgotten trash or food, and pet waste are the most common breeding sources. In fall and late winter, cluster flies coming out of wall spaces are another frequent cause.
The fix is to find and remove the source. Killing the adults you can see helps, but more will keep showing up until the breeding spot is gone.
How a few flies become many so fast
House flies and blow flies lay eggs on rotting material. The eggs hatch into maggots, which feed, then move away to a drier spot to pupate before coming out as adults. In warm conditions, this whole cycle can take as little as a week or two. Because a single female can lay many eggs, one hidden source can produce a burst of adult flies all at once, which is why it often looks as if they arrived overnight.
If you find maggots, our guides on which flies turn into maggots and what kills maggots immediately go into more detail.
The most common causes
A dead animal in a wall, attic or crawl space
This is one of the most common reasons for a sudden indoor outbreak, especially if the flies are large, shiny and metallic green or blue (blow flies). A mouse, rat, bird or other small animal that died in a wall void, attic, chimney or under the floor can produce many flies. You may notice a bad smell first, or see flies gathering in one room or around a particular wall or vent.
If you suspect this, check attics, crawl spaces, basements and behind appliances. If you’ve recently used rodent bait, this becomes more likely.
Trash, compost and food waste
Kitchen trash cans, recycling bins with food residue, compost caddies and forgotten food can all host maggots. Check under the sink, inside the bin itself (not just the bag), behind the fridge and stove, and in garbage disposals. Outdoor bins close to doors can also send flies inside.
Pet waste
Litter boxes, dog waste in the yard, and soiled pet bedding are attractive to flies. Clean litter boxes often, and pick up waste outside regularly, especially in warm weather.
Cluster flies waking up in the walls
If the flies are slow, clumsy and gathering at sunny windows in fall or on warm days in late winter and early spring, they may be cluster flies. These flies are a bit larger than house flies and look slightly golden or hairy on the thorax. They don’t breed in your house: their larvae develop in soil, as parasites of earthworms. In fall, adults crawl into gaps in walls and attics to spend the winter, then wander into living spaces when the house warms up. They are drawn toward light, which is why they collect on windows.
Cluster flies are a nuisance rather than a health concern, and the long-term fix is sealing gaps on the outside of the house in late summer, before they move in.
An open door, gap or torn screen
Sometimes the answer is simpler: a door was left open, a screen is torn, or a lit window attracted flies from outside. This usually brings in a few flies rather than dozens, but it can add up in summer, especially near livestock, dumpsters or compost piles.
For a broader look, see our guide on what causes house flies in the house.
Make sure they are house flies
Before you start searching, take a close look at the flies. Very small flies are often not house flies at all:
- Fruit flies are tiny, often tan with red eyes, and hover around ripe fruit, drains and recycling.
- Drain flies are small, fuzzy and moth-like, and are usually found near sinks, tubs and floor drains.
- Fungus gnats are small, dark and delicate, and tend to come from damp houseplant soil.
Each of these has a different source and a different fix. Our article on what is commonly mistaken for fruit flies can help you tell them apart.
What to do right now
- Look for the source. Follow the flies. Note which room they gather in and check for smells, trash, spoiled food or signs of a dead animal.
- Remove and clean it. Bag up and throw out rotting material, clean bins with hot soapy water, and clear out drains and spill areas. A dead animal should be removed with gloves and the area cleaned; if it is inside a wall, you may need a professional.
- Deal with the adults. A fly swatter, a vacuum with a hose attachment, or sticky fly traps can handle the flies already inside. Avoid spraying pesticides around food or children unless you follow the label carefully.
- Let them out. Flies are drawn to light, so at night you can turn off the lights in the room, open a door or window to a lit area outside, and many will leave on their own.
Keeping them from coming back
- Keep kitchen trash covered and take it out often, especially in summer.
- Rinse recycling and clean bins regularly.
- Repair screens and seal gaps around windows, doors, vents and pipes.
- Keep outdoor bins and compost away from doors.
- Reduce bright lights near entrances at night, which can draw flying insects toward the house. Our guide on how to stop insects attracted to light has practical tips.
When to call a professional
Consider calling a pest control professional if you can’t find the source, if you suspect a dead animal inside a wall or ceiling, or if flies keep coming back after cleaning. A professional can also help if cluster flies are a recurring problem every year, since sealing and treating the outside of the house at the right time of year is the most effective approach.