How to Get Rid of Flies
Learn how to get rid of flies by removing food sources, sealing entry points, using traps safely, cleaning drains and trash, avoiding mistakes, and preventing return.

Quick Answer
To get rid of flies, remove food and trash sources, clean spills and drains, keep doors and windows screened, seal gaps, use fly traps or swatters safely, and keep outdoor bins covered. If flies keep returning, identify whether they are house flies, fruit flies, drain flies, or gnats because each source needs a different fix.
Supplies Required
- Trash bags
- Mild cleaner
- Covered trash bin
- Window or door screens
- Fly traps or swatter
- Drain brush if needed
- Gloves
Safety Precautions
- Follow all pesticide labels.
- Keep sprays and traps away from children, pets, food, and food-prep surfaces.
- Do not mix cleaning chemicals.
- For heavy infestations, dead animals, sewage issues, or rental property problems, contact a professional or property manager.
Step-by-Step Instructions
- Step 1
Identify the fly source
Check trash, drains, compost, pet waste, fruit, food spills, and open doors or screens.
- Step 2
Remove food and waste
Take out trash, clean bins, cover food, rinse recycling, and remove pet waste quickly.
- Step 3
Clean surfaces and drains
Wipe sticky areas and scrub drains if flies gather near sinks.
- Step 4
Block entry points
Repair screens, close doors quickly, and seal gaps around windows or doors.
- Step 5
Use traps safely
Place traps where flies gather but away from food, children, and pets.
- Step 6
Control outdoor attractants
Keep outdoor bins sealed, move compost away from doors, and clean grill or patio spills.
- Step 7
Repeat prevention
Continue source control for several days so new flies do not replace trapped adults.
Practical Example
Example: Flies gather near the kitchen door and trash bin. You clean the bin, repair a torn screen, store food covered, and place a trap away from the counter.
Common Mistakes
- Using traps without removing the source
- Leaving trash uncovered
- Ignoring torn screens
- Spraying near food
- Confusing fruit flies with house flies
- Stopping cleanup too soon
Troubleshooting
Flies keep appearing indoors
Look for hidden food waste, drain buildup, dead insects, or entry gaps.
Small flies are near fruit
Use the fruit-fly source removal method and refrigerate produce.
Flies are near drains
Scrub organic buildup and avoid unsafe chemical mixing.
Outdoor flies are severe
Move trash/compost away from entrances and consider professional pest control.
Helpful Internal Links
FAQs
What attracts flies indoors?
Food, trash, pet waste, sticky spills, drains, compost, and open entry points.
Are fly traps enough?
Traps help, but source removal and entry control are more important.
Why do flies return after cleaning?
A hidden source, outdoor entry point, or different fly type may still be present.
When should I call pest control?
Call for heavy recurring infestations, sanitation issues, or sources you cannot safely remove.
Related Guides
How to Get Rid of Fruit Flies
Learn how to get rid of fruit flies by removing ripe fruit, cleaning drains and trash, setting traps, preventing eggs, avoiding mistakes, and troubleshooting.
How to Get Rid of Gnats
Learn how to get rid of gnats by identifying fruit flies, drain flies, or fungus gnats, removing sources, using traps, fixing plants, and preventing return.
How to Get Rid of Ants
Learn how to get rid of ants by finding trails, removing food sources, sealing entry points, using bait safely, avoiding mistakes, and knowing when to call a pro.
Help us improve this guide
Tell us about an outdated instruction, unclear step, broken link or safety concern. Do not include passwords, account numbers, medical records or other sensitive information.


