Published February 7, 2023 • Updated April 23, 2026
Reviewed by Julie Miller, BA in Language Arts, Editorial Lead, Dr. Killigan’s
TL;DR: Most adult houseflies live about 15 to 25 days. In warm homes, they can reproduce quickly, which is why a short-lived fly can still turn into a lingering problem. This guide covers the housefly life cycle from egg to adult, where flies lay eggs, what attracts them into your home and how to get rid of flies using safe, non-toxic methods like smart trapping and better sanitation.
Flies can be a constant annoyance, buzzing around your home, landing on your food and refusing to disappear. They seem to show up out of nowhere, then circle the room as if they own it.
Common Housefly (Musca domestica)What are houseflies?
Houseflies belong to the order Diptera and are considered “filth flies” because they breed in decaying organic matter. These small, dark gray insects measure 5–7 mm long, with two overlapping wings, large compound eyes and soft, sponge-like mouthparts designed to soak up liquids—which is why they’re drawn to food waste, spills and moisture.
If “filth flies” didn’t bother you, picturing that spongy straw-like mouth dabbing and sucking across surfaces probably will.
Despite their reputation, houseflies do play ecological roles such as breaking down organic material. But inside your home, they’re unwelcome guests.
Where do flies come from?
Flies usually come from nearby food, waste, moisture or breeding sites. They don’t typically travel far, but they can move quickly when the conditions are right.
So, how far do house flies travel? Houseflies usually stay close to their breeding site. While some can travel several miles, most remain within one to two miles, especially when food, moisture and breeding sites are nearby.
They’re attracted to:
- Rotting or moist organic food
- Food waste
- Manure
- Decaying vegetation
- Compost
- Warm indoor air escaping from homes
If your trash lid doesn’t seal, if you keep a garden with manure, if you have torn screens or a door left open “for just a minute,” you’ve provided an entry point.
For a deeper look at what draws flies into homes and which colors attract them, read our guide on what attracts flies and which colors they love.
Pocket fact:
Flies prefer temperatures around 88°F, which is why warm homes tend to bring them inside.
How long do flies live? The average housefly lifespan

In typical conditions, an adult housefly survives only a few weeks, though temperature, humidity and access to food can affect how long it lives.
- In temperate regions: 10-12 generations per year
- In subtropical or tropical regions: 20+ generations per year
Temperate regions have milder seasons, while tropical and subtropical regions stay warm and humid most of the year. This means that in warm climates—or warm homes—flies reproduce continuously, which is why indoor infestations can feel never-ending.
The life cycle of a housefly
A female housefly lays up to 500 eggs over 3–4 days, often near other females doing the same. The life cycle moves fast:
- Egg. Hatches in under 24 hours
- Larva (maggots). Feeds and grows for 1-2 weeks
- Pupa. Develops inside a hardened case for a few days
- Adult housefly. Lives about 15-25 days
Where do flies lay eggs?

Flies need moisture and organic material. They lay eggs in:
- Animal feces
- Carrion
- Human excrement
- Grass clippings or other garden waste
- Fermenting vegetable matter
- Kitchen waste
- Partially incinerated garbage
- Compost piles
In homes, flies rarely get the chance to lay eggs—unless it's in a wall void, crawlspace or attic where a decaying animal, like a rodent or bird, has entered.
Pocket fact:
Flies can lay eggs on exposed food, but you wouldn’t see the eggs—only the maggots a few days later.
How do I get rid of flies in my house?
Here’s the part that matters most—controlling flies after they’ve entered and preventing them from coming back.
If you prefer natural methods, our article on natural ways to deter flies offers additional prevention tips that pair well with the steps below.
1. Eliminate what attracts them
- Clean spills straight away
- Keep trash sealed
- Remove rotting produce
- Fix torn screens or gaps around doors
- Reduce standing water
2. Use an effective fly trap

When you want a hands-off solution, The Fly Inn is our top recommendation. Designed for windows and glass doors, it quietly catches houseflies, gnats and other light-loving insects, then hides them behind its inner walls so you’re not staring at a strip of stuck bugs. Its proprietary visual attractant and sticky inserts work with the light already streaming into your home, so once it’s in place, the trap can keep working while you get back to your day.
How to use The Fly Inn
- Choose a "busy" window or glass door where flies (and other insects) already tend to hover.
- Clean the glass, lightly dampen the suction cups, then press the trap along the bottom edge of the window so insects are likely to fly straight into the opening.
- Replace the insert when full—there are no fumes or sprays to worry about, just swap and keep going.
Why it works:
Flies naturally gravitate toward windows. The Fly Inn turns their favorite landing spot into the last place they’ll ever land.
3. Reduce breeding sites outdoors
- Keep garbage bins tightly closed
- Move bins away from doors
- Maintain compost properly
- Clean animal waste regularly
- Avoid leaving pet food outdoors
Together, these steps break the fly lifecycle and stop future waves of adults from entering.
Explore more
-
What attracts flies?
(Understand the food, moisture, warmth and light cues that bring flies indoors.) -
Natural ways to deter flies
(Simple prevention steps that make your home less inviting before flies settle in.)















