How to Get Rid of Flies in House: 12 ways to clear the room

Flies in the house always trace back to a source: something they are breeding in, or a gap they are coming through. You can kill the adults all day, but until you find the source, a fresh batch is a week away. That is why people spray and swat for weeks and get nowhere. The methods below are in the order that actually works: find and remove the source first, shut the entry points, then catch and kill what is left. The gadgets everyone reaches for first are the last third of this list on purpose.

What causes this problem

Flies do not appear from nothing. The common indoor kinds – house flies, fruit flies and drain flies – develop in moist, decaying organic matter, and the usual sites are close by: a kitchen bin, produce that has rolled behind a cupboard, spilled liquid that has begun to ferment, pet waste, or the organic film inside a drain. One group breaks the pattern. Cluster flies do not breed indoors at all; they develop outdoors as parasites of earthworms and only come inside in autumn to overwinter in wall voids and attics, then reappear at windows on warm days.

Which fly you have points at the source, and where you see them is a clue rather than a firm identification. Larger flies around garbage and waste are usually house flies; a surge of them with no visible food can mean a dead animal in a wall or under the floor. Small flies hovering at a fruit bowl are likely fruit flies, tan and red-eyed, breeding in overripe produce. Small, fuzzy, moth-like flies that rest on walls near a sink or shower are drain flies breeding in the film inside the pipe. Confirm by the fly’s own traits, not location alone, and you know where to look.

1. Eliminate Breeding Sources

This is the method that actually ends an infestation. Every other approach kills or catches adults while new ones keep emerging. A single female lays up to 150 eggs at a time that hatch within about a day, so the source refills faster than you can swat it. Find what they are breeding in and remove it: an overflowing or greasy bin, forgotten produce, spilled liquid that has started to ferment, uncleaned pet waste, or a dead animal in a wall or under an appliance. Bag organic waste separately and take it out daily.

Once you clear the source, expect a lag of one to two weeks while eggs and larvae already present finish hatching. In warm weather the whole cycle runs in as little as 7 to 10 days, so the count tapers off rather than dropping to zero overnight. If flies keep appearing with no findable source, follow your nose for a dead animal and check every drain for slow flow.

2. Seal Cracks, Gaps, and Install Screens

Sealing is the only method that stops new flies from entering. Everything else deals with flies already inside. A gap under a door, a tear in a window screen, a crack around a dryer vent – these are the actual entry points, and closing them is the only permanent piece of the puzzle.

Inspect every door and window. Add weatherstripping on frames that do not seal fully, and fit door sweeps with firm rubber blades that contact the threshold all the way across. Replace torn window screens rather than patching them, since patches lift at the edges. Caulk around window frames and baseboards where gaps have opened, and check that dryer vents and bathroom exhaust fans have intact screens. A single gap the width of a pencil is enough for most house flies. An afternoon of sealing beats months of catching the ones that keep getting in.

3. Clean the Drain with a Snake or Brush

If the flies are small and drifting up from a sink, shower or floor drain, they are drain flies breeding in the slimy organic film that coats the inside of the pipe. A drain snake or long pipe brush physically scrapes that buildup away and destroys the breeding ground. Run warm water down the drain first to soften the film, then work the brush or snake through with a gentle up-and-down motion.

This lasts where chemical pours do not. Boiling water, baking-soda-and-vinegar and bleach each buy a week or two before the flies return, because they only treat the surface. Scraping the pipe removes the film where the larvae actually live. A plunger can help pull out stubborn material once you have loosened it.

4. Apple Cider Vinegar Traps

The standard fruit fly trap, and it works. Pour about 2 fl oz (60 ml) of apple cider vinegar into a small bowl or glass. Add a few drops of dish soap and stir lightly. The vinegar smell attracts fruit flies; the soap breaks surface tension so they drown on contact instead of landing and escaping.

Set several traps near where you have seen the most activity – typically near the fruit bowl, trash can and sink drain. Refresh daily. White vinegar does not work as well; fruit flies respond specifically to the fermented smell of apple cider vinegar. If you are not catching anything after 24 hours, the flies you are dealing with are probably not fruit flies – they could be drain flies (check slow drains) or house flies (vinegar does not attract them much).

Apple cider vinegar trap with fruit flies on a kitchen counter

5. Use Sticky Traps

Yellow sticky traps exploit a visual attraction response that most flying insects have toward yellow surfaces. Hang them near windows, light sources and areas with fly activity. They are passive, need no monitoring, and clearly show you where the fly problem is concentrated.

For fruit flies, traps placed at drain level and near compost catch more than traps hung high. Replace a trap when it is covered, since a saturated surface stops working. Sticky traps do not address the source of an infestation, but they reduce the active population while you work on root causes and they double as a monitoring tool.

Yellow sticky trap with caught flies hanging near a window

6. UV Light Trap

Indoors, a UV light trap that draws flies onto a sticky board or into an enclosed tray can help clear stragglers, but only when it is placed well. Shield it from daylight and other lighting so the trap is the brightest thing in the room, mount it low on a wall rather than up near the ceiling, and keep it away from doors and windows so it is not pulling flies in from outside.

Do not count on an outdoor patio zapper. Extension testing rates lawn and patio electrocutors as very ineffective against biting and nuisance flies, and they kill mostly harmless insects; flies outdoors are a separate problem with better answers. Whatever the type, keep the high-voltage electrocuting kind away from food, since a zap scatters fine insect fragments. A trap with an enclosed catch is the cleaner choice.

7. Plant Repellent Herbs

Basil, mint, lavender, rosemary and lemongrass all repel flies through their strong aromatic compounds. Potted basil on a kitchen windowsill has a genuine deterrent effect on house flies. Crush a leaf occasionally to release more of the volatile oils.

This will not clear out an existing infestation – it is a deterrent, not a trap. But potted herbs at doorways and windows create a scent barrier that makes those entry points less attractive, and they are useful in outdoor eating areas where fly traffic is annoying but not infestation-level.

8. Essential Oil Repellents

Essential oils such as eucalyptus and clove are sold as fly deterrents, diluted in water with a drop of dish soap to emulsify and wiped or lightly misted around door frames, window sills and other spots where flies land or enter. Treat this as a mild perimeter deterrent, not a fix: it will not knock down an active infestation, and the scent fades as the oils evaporate, so it needs redoing.

Be careful with peppermint oil if you have a cat. Cornell lists peppermint oil as toxic to cats, so keep any oil spray and the surfaces you treat well away from where a cat walks, grooms or rests, and lean on the plant deterrents above in a home with cats.

9. Use Bay Leaves as a Repellent

Bay leaves contain eucalyptol and other volatile compounds that flies find unpleasant. Place dried bay leaves on windowsills, on shelves behind furniture, in pantry corners and near trash cans, and crush them slightly to release more oil. For more coverage, boil 10 to 15 leaves in a couple of cups of water, cool and strain it, and spray the same spots.

Replace the leaves as the scent fades. One caution: bay laurel is toxic to dogs, cats and horses if eaten, so keep loose leaves and any spray where pets cannot reach them, not on a low shelf or a floor a curious pet can get to. They are not a fix for an active infestation, but they are a low-effort deterrent for spots where flies tend to linger and pets do not.

Fresh basil, lavender, and bay leaves used as fly repellents

10. Insecticide Sprays

For a severe active infestation, a targeted spray gives immediate knockdown that nothing passive matches. Look for products labelled for flying insects containing pyrethrin (botanical) or permethrin (synthetic). Spray window sills, door frames and fly landing surfaces lightly, and follow the label directions precisely.

Never use outdoor-rated foggers or bombs indoors, and never spray food prep surfaces. Insecticides kill adult flies but do nothing about breeding sources, so spraying without also fixing the sanitation issue just keeps replacing the adults as new ones emerge. Use it to knock down the active population while you deal with the root cause, not instead of it.

11. Fly Swatter

Exactly what it sounds like. A fly swatter works if you have the patience and reflexes for it. Flies detect the air pressure change from an approaching swat, which is why they dodge so often, so approach slowly and swing fast rather than telegraphing the motion. Aim slightly ahead of where the fly is sitting. Satisfying when you connect, but not a strategy for more than a few flies at a time.

12. Electric Fly Swatter

A tennis-racket-shaped electrified mesh. Easier to aim than a flat swatter, faster to swing, and you get a definitive zap on contact rather than a smear. The mesh allows for precision on a resting fly. It is not a toy despite the shape, so keep it away from children and charge it regularly. Better than a regular swatter for anyone with slower reflexes, and it handles the stragglers efficiently once you have dealt with the sources.

How to prevent flies coming back

Prevention is the same work as the cure, done before there is a problem. Take organic waste out daily in warm weather, keep bins lidded and rinse them out when residue builds up. Wipe spills as they happen and do not leave produce sitting out past ripe. Rinse recycling before it goes in the bin. Keep drains running freely and give them a mechanical clean every few weeks if you are prone to drain flies.

On the exclusion side, keep exterior doors shut when they are not in use, keep window screens intact, and deal with gaps around vents and utility lines before the warm months. If you have pets, keep litter boxes and yard waste cleared on a schedule. None of this is dramatic, but together it removes both halves of the equation: nothing to breed in, and no easy way in.

When to call a professional

Most fly problems are solvable in an afternoon of source-hunting and sealing. Call a pest professional when the flies persist for more than two weeks after you have removed every source you can find and sealed the obvious entry points, or when you have a sudden, heavy surge of house flies you cannot trace. A hidden breeding site, most often a dead animal inside a wall, attic or floor cavity, sometimes needs someone who can locate and reach it. Large or repeat infestations, or flies breeding somewhere structural you cannot access, are also worth a professional inspection rather than another round of spray.

Frequently asked questions (FAQ)

Why do I suddenly have so many flies in my house?

Usually a breeding source has become active nearby: for house flies with no obvious food, the classic cause is a dead animal in a wall, attic or under the floor, and for small flies it is overripe produce or a dirty drain. There is one common exception. If large, sluggish flies gather at windows on warm days in autumn or late winter, those are likely cluster flies that came inside to overwinter in the walls; they did not breed indoors and drift back out on their own. Find and remove a real source and the surge ends; for overwintering cluster flies, seal the entry points and vacuum up the ones that appear.

What is the fastest way to get rid of flies?

Find and remove what they are breeding in. Spraying feels faster but only clears the adults you can see while new ones keep emerging. Removing the source is the only step that stops production, and traps and swatters then clear the stragglers.

How long does it take to get rid of a fly infestation?

Usually one to two weeks after you remove the source. Eggs and larvae already laid finish developing and emerge as adults before the cycle breaks, so the numbers taper off rather than stopping at once.

Does the vinegar and dish soap trap actually work?

Yes, but only for fruit flies. If your trap catches nothing, you are likely dealing with drain flies (check slow drains) or house flies, which the fermented smell does not attract. Match the method to the fly.

What smell keeps flies away?

Flies dislike the volatile compounds in basil, mint, lavender, peppermint, eucalyptus, clove and bay. These deter flies from entry points but will not clear an active infestation on their own.