How to Get Rid of Flies in Your House (DIY Guide)
"Flies" is a broad category — and the approach that works for one type is useless for another. A fruit fly trap won't catch drain flies. Cleaning your drains won't stop cluster flies. The key is figuring out which fly you have. This guide covers the five most common indoor flies and the specific steps to eliminate each one.
At a Glance
Difficulty
EasyTime Needed
1-2 hours
DIY Cost
$10-$40
What You're Dealing With
Here are the five flies you're most likely to encounter indoors, ranked by how often we see questions about them:
- Fruit flies — Tiny, tan/brown, near fruit and kitchens. The most common indoor fly complaint.
- House flies — The classic large, buzzing fly. Gray with four dark stripes on the thorax.
- Drain flies — Tiny, fuzzy, moth-like flies near bathroom and kitchen drains.
- Cluster flies — Large, sluggish flies that appear indoors in fall and winter, usually on sunny windows.
- Fungus gnats — Tiny black flies hovering around houseplants.
Each breeds in a completely different place, so identifying your fly determines 90% of the solution. Scroll to your fly type below for specific treatment.
What You'll Need
- Apple cider vinegar + dish soap — For fruit fly traps.
- Drain brush and enzyme drain cleaner — For drain fly treatment (like InVade Bio Drain or Drain Gel).
- Fly paper or ribbon strips — For house flies and cluster flies. Old-fashioned but very effective.
- UV light fly trap (optional) — Plug-in models (like DynaTrap or Katchy) work well for ongoing house fly issues.
- Window screens — For preventing house flies from entering.
- Caulk — For sealing exterior gaps (cluster fly prevention).
- Yellow sticky traps — For fungus gnats in houseplant soil.
- Hydrogen peroxide (3%) — For killing fungus gnat larvae in soil.
- Sand or perlite — For topping houseplant soil to prevent fungus gnat egg-laying.
Step-by-Step Guide
1. Fruit Flies
Where they breed: Fermenting or overripe produce, spilled juice or alcohol, recycling bins with residue, damp mops and sponges, and (less obviously) floor drains with organic buildup. They can complete a generation in as little as 8 days in warm conditions.
Treatment:
- Find and remove the source. This is 80% of the solution. Check for overripe bananas, tomatoes, onions, and potatoes. Check your recycling bin for beer/wine bottles with residue. Look under the fridge for spilled juice. Throw out or refrigerate all ripe produce.
- Set ACV traps. Fill a small glass or jar with 1/2 inch of apple cider vinegar and add 2–3 drops of dish soap. The vinegar attracts fruit flies; the soap breaks the surface tension so they sink and drown. Place 2–3 traps near activity areas. Replace every 2–3 days.
- Clean drains. Fruit flies sometimes breed in drain gunk. Pour boiling water down kitchen and bar drains, then follow with enzyme drain cleaner.
- Clean all surfaces. Wipe down countertops, clean out the garbage disposal, and take out the trash and recycling.
With the source removed, adult fruit flies die within 2 weeks (their natural lifespan). Traps speed this up considerably.
For a more detailed treatment, see our dedicated fruit fly guide.
2. House Flies
Where they breed: Garbage, animal feces, decaying organic matter, compost bins, and dumpsters. House flies don't typically breed inside homes — they enter from outdoors and are attracted to food odors.
Treatment:
- Seal entry points. Check all window screens for holes — even small tears allow house flies in. Install or repair screens on all windows you open. Install door sweeps on exterior doors, especially the door between your garage and house.
- Remove attractants. Keep garbage cans sealed with tight lids (both indoor and outdoor). Clean up pet waste daily. Move compost bins away from the house. Keep outdoor garbage cans clean — rinse them with a hose weekly in summer.
- Hang fly paper. Old-fashioned sticky fly strips are highly effective. Hang them in garages, near trash cans, and in kitchens (discreetly, if possible). They catch flies continuously without chemicals or electricity.
- Use a UV fly trap. Plug-in UV light traps (like DynaTrap or Katchy) attract flies with ultraviolet light and trap them on a glue board or fan-powered catch tray. These are excellent for kitchens, garages, and indoor areas with persistent fly issues.
- DIY fly spray (last resort). For a heavy house fly presence, a pyrethrin-based aerosol (like CB-80 or Raid Flying Insect) provides quick knockdown. Use sparingly — it kills flies on contact but doesn't prevent new ones from entering. Focus on exclusion and sanitation instead.
3. Drain Flies
Where they breed: Inside the slimy biofilm that coats the inside of drain pipes, especially in bathrooms and basement floor drains. They can also breed in sewage treatment facilities, septic systems, and HVAC condensate lines.
Treatment:
- Confirm the source drain. Place a strip of clear tape over each suspect drain overnight (sticky side down, leaving edges open for airflow). Check the tape in the morning — if drain flies are stuck to it, that's the source drain.
- Brush the drain. Use a stiff drain brush to physically scrub the inside walls of the drain pipe. This is the most important step — it removes the organic film where larvae live. No chemical can replace mechanical scrubbing.
- Apply enzyme drain cleaner. After brushing, pour an enzyme-based drain gel (InVade Bio Drain, Drain Gel, or Green Gobbler) into the drain. These contain bacteria that consume the organic biofilm. Apply nightly for 5–7 nights.
- Flush with boiling water. Follow the enzyme treatment with boiling water to flush loosened material.
- Don't use bleach. Bleach doesn't penetrate biofilm effectively and provides only temporary relief. Enzyme cleaners + brushing is far more effective.
For a more detailed treatment, see our dedicated drain fly guide.
4. Cluster Flies
What they are: Large, sluggish flies (slightly larger than house flies) that appear indoors in fall, winter, and early spring. They enter homes in late summer to overwinter in wall voids and attics, then emerge on warm, sunny days — often clustering on south-facing windows. They're slow and easy to swat. They don't breed indoors and don't carry disease.
Treatment:
- Vacuum them up. The simplest approach for cluster flies already inside. They're slow-moving and easy to vacuum off windows and walls. Empty the vacuum outside.
- Prevention is the real solution. Cluster flies enter homes in August and September through gaps in the exterior — around windows, under eaves, through soffit vents, and around attic vents. In late summer, seal these gaps with caulk, weatherstripping, and 1/4-inch mesh screening over vents.
- Insecticide treatment (exterior). If cluster flies are a recurring problem, apply a residual pyrethroid spray (like Tempo SC Ultra or Demand CS) to the exterior south and west walls of your home in late August or early September, before flies start entering. Focus on areas around windows, under eaves, and around utility entries. This deters flies from landing and entering.
- Light traps. A plug-in UV light trap near windows where cluster flies congregate catches many of them before they spread through the house.
5. Fungus Gnats
Where they breed: In the moist soil of overwatered houseplants. They're the tiny black flies hovering around your potted plants.
Treatment:
- Let the soil dry out. Allow the top 1–2 inches of soil to dry completely between waterings. Fungus gnats can only breed in consistently moist soil.
- Treat the soil with hydrogen peroxide. Mix one part 3% hydrogen peroxide with four parts water. Water plants with this solution — it kills larvae without harming roots. Use for 2–3 watering cycles.
- Use yellow sticky traps. Insert small yellow sticky traps into the soil of affected plants. Adult fungus gnats are attracted to yellow and get trapped.
- Top the soil with sand. Add a 1/2-inch layer of coarse sand, perlite, or decorative pebbles on top of the soil. This physical barrier prevents adult gnats from reaching the soil to lay eggs.
For a more detailed treatment, see our dedicated fungus gnat guide.
Prevention Tips
- Screens on all windows and doors — This single measure prevents the majority of house fly entries. Check screens for holes at the start of every summer and repair or replace as needed.
- Sanitation is key for fruit flies and house flies — Don't leave ripe produce on the counter. Keep garbage cans clean and sealed. Clean up pet waste. Rinse recycling containers before putting them in the bin.
- Monthly drain maintenance — Pour boiling water down bathroom drains monthly to prevent the biofilm buildup that drain flies breed in. This takes 60 seconds and prevents a problem that takes days to fix.
- Seal exterior gaps in late summer — Cluster flies and other overwintering pests enter in August and September. A late-summer exterior inspection and sealing prevents winter fly problems.
- Don't overwater houseplants — Most fungus gnat problems are caused by overzealous watering. Let soil dry between waterings — your plants will be healthier too.
Common Mistakes to Avoid
- Treating all flies the same way — An ACV trap is useless for drain flies. Cleaning drains does nothing for fruit flies breeding in your recycling bin. Fly paper won't catch fungus gnats near your plants. Identify the fly first, then apply the right treatment.
- Focusing on killing adults without addressing the breeding source — Swatting, spraying, and trapping flies without eliminating where they breed is an endless cycle. Find and remove the source, and the adult population dies off within days to weeks.
- Using bleach for drain flies — Bleach runs through the drain too quickly to penetrate the biofilm where drain fly larvae actually live. A drain brush + enzyme cleaner is far more effective because it physically removes and biologically degrades the biofilm.
- Ignoring screening — A torn window screen or a gap under a door renders all other house fly control efforts pointless. Fix physical entry points before spending money on traps and sprays.
- Bug-bombing for flies — Total release foggers (bug bombs) are a poor choice for flies. They leave residue everywhere, don't reach breeding sources, and require you to vacate the house. Targeted treatments are more effective, cheaper, and safer.
When to Call a Professional
Flies rarely require professional pest control. Nearly all fly problems can be resolved with DIY methods. However, consider calling a pro if:
- You can't identify the fly or find the breeding source — If DIY efforts haven't worked after 2 weeks, a pest professional can identify the species and locate the breeding source you're missing. Sometimes it's a dead animal in a wall void, a broken sewer pipe, or another hidden source.
- You have a large-scale cluster fly problem — Homes with severe annual cluster fly infestations (hundreds of flies) may benefit from professional exterior treatments applied at the right time in late summer.
- Flies are emerging from wall voids or unusual locations — Blow flies (large, metallic blue or green flies) emerging from walls or ceilings usually indicate a dead animal. A professional or your HVAC contractor can locate and remove it.
- You suspect a sewer or plumbing issue — If drain flies persist despite thorough drain cleaning, there may be a broken sewer line, a dry trap, or a plumbing leak providing a breeding source that needs professional plumbing repair, not pest control.
Frequently Asked Questions
Why do I suddenly have so many flies in my house?
A sudden explosion of flies almost always means a new breeding source has appeared. For fruit flies: check for overripe produce, spilled juice, or fermenting material. For house flies: check for a nearby garbage issue, pet waste, or a dead animal. For drain flies: a drain that hasn't been used in a while (dry P-trap) can suddenly produce flies. For cluster flies: they emerge from wall voids on warm winter days after entering in late summer. Identify the type of fly and you'll find the source.
Do UV light fly traps actually work?
Yes, UV light traps are quite effective for house flies and other medium to large flies that are attracted to ultraviolet light. They work less well for fruit flies and fungus gnats, which are more attracted to food odors and soil moisture respectively. The best UV traps use glue boards (not zappers) because they capture flies silently without scattering body parts. Good options include the DynaTrap for indoor use and the Katchy for countertop use.
How long does it take to get rid of flies?
It depends on the species. Fruit flies: 1–2 weeks after removing the breeding source (adult lifespan is about 8–15 days). Drain flies: 1–3 weeks after thorough drain cleaning. House flies: immediately after sealing entry points, though you'll need to trap or swat ones already inside. Cluster flies: they die off or leave on their own by spring, but prevention for next year requires sealing in late summer. Fungus gnats: 2–4 weeks after drying out the soil and treating with hydrogen peroxide.
Need Professional Help with Flies?
DIY not cutting it? Describe your pest problem and get matched with licensed professionals in your area.
Get a Free QuoteFind Flies Exterminators Near You
Browse our directory of licensed pest control professionals who can help with flies problems.
Search DirectoryRelated DIY Guides
How to Get Rid of Fruit Flies Fast (DIY Guide)
Get rid of fruit flies in your kitchen with simple DIY traps and prevention tips. Learn what attracts them, how to make vinegar traps, and how to keep them away for good.
How to Get Rid of Drain Flies (DIY Guide)
Get rid of drain flies with this easy DIY guide. Learn what causes them, how to clean drains properly, and prevent them from coming back.
How to Get Rid of Gnats in Your House (DIY Guide)
Get rid of gnats fast with this DIY guide. Covers fungus gnats, fruit flies, and drain flies — how to identify which you have and eliminate them.
Learn More
Pest Guide
How to Get Rid of Flies: House Flies, Drain Flies, Fruit Flies & More
Complete guide to identifying and eliminating flies in your home. Covers house flies, drain flies, fruit flies, cluster flies, and blow flies with DIY and professional solutions.
Cost Guide
Fly Control Cost (2026 Guide)
$200 per treatment
This guide is for informational purposes only. Always follow product label instructions and safety precautions when applying any pest control treatment. Last updated: 2026-03-10.