Getting rid of gnats and mosquitoes inside your home requires figuring out what you’re actually dealing with, then eliminating the source where they breed. Sprays and traps can knock down the adults you see flying around, but the insects will keep coming back until you remove the moisture, organic matter, or standing water that sustains them. Here’s how to identify, trap, and permanently eliminate indoor flying pests.
Identify What’s Actually Flying Around
People lump all tiny flying insects together as “gnats,” but the species matters because each one breeds in a different place. Treating the wrong source wastes your time.
- Fungus gnats look like tiny mosquitoes, less than an eighth of an inch long, with dark bodies and light-colored legs. If you see a cloud of small insects hovering above a houseplant, these are almost certainly the culprit. They breed in moist potting soil.
- Fruit flies are rounder, shaped more like a miniature housefly, and tend to hang around kitchens, garbage cans, and fruit bowls. They’re attracted to fermenting organic matter.
- Drain flies are fuzzy, moth-like insects that rest on walls near sinks or floor drains. They breed in the slimy biofilm that lines the inside of drain pipes.
- Mosquitoes are larger, with long legs and a distinctive whining flight sound. Indoors, they typically entered through gaps in screens or open doors and are looking for a blood meal, not a breeding site (unless you have standing water somewhere inside).
Eliminate Fungus Gnats in Houseplants
Fungus gnats lay eggs in wet potting soil, and their full life cycle from egg to adult takes roughly 17 days at room temperature. Eggs hatch in about three days, larvae develop over 10 days, then pupae emerge as adults four days later. That means even after you intervene, you’ll see new adults for two to three weeks as the existing eggs and larvae mature. Patience and consistency matter more than any single product.
The single most effective step is letting the top inch or two of soil dry out completely between waterings. Fungus gnat larvae need moisture to survive, and dry soil kills them. For plants that can tolerate it, bottom watering (placing the pot in a tray of water and letting the soil wick moisture upward) keeps the surface layer dry where gnats lay eggs.
A biological soil drench containing Bti, a naturally occurring bacterium that kills gnat larvae but is harmless to plants, pets, and people, works well as a supplement. Because Bti doesn’t persist in soil, you’ll need to reapply every five days or so until the infestation clears. Yellow sticky traps placed at soil level catch adults and help you monitor whether the population is declining.
If a particular pot is heavily infested and the plant isn’t precious, repotting with fresh, sterile soil is the fastest fix. You can sterilize soil yourself by bagging it in clear plastic no more than eight inches deep and leaving it in direct sun for four to six weeks, though buying new soil is usually more practical.
Get Rid of Fruit Flies Fast
Fruit flies can go from egg to adult in about a week under warm conditions, so they multiply quickly. Start by removing every possible food source: overripe fruit, vegetable scraps, damp sponges, recycling bins with residue, and anything fermenting. Take out the trash, wipe down counters, and clean under appliances where bits of food collect.
While you clean up the breeding sources, a simple trap handles the adults. Fill a jar with a quarter cup of apple cider vinegar and add a few drops of liquid dish soap. The vinegar’s fermentation scent draws the flies in, and the soap breaks the surface tension of the liquid so they can’t land and fly away. Their wings get weighed down and they drown. Cover the jar with plastic wrap, secure it with a rubber band, and poke a few small holes with a fork so flies can enter but struggle to escape. Place traps near problem areas and replace the vinegar every few days.
A nearly empty wine bottle works on the same principle. The narrow neck funnels flies in, and the residual wine does the rest.
Clear Drain Flies at the Source
Drain flies breed in the slimy organic buildup (biofilm) inside pipes. This is where most people reach for bleach, but bleach kills adult flies on contact without actually penetrating the biofilm where larvae live. The biofilm has a protective structure that resists chemical treatments. Boiling water has similar limitations: it cools rapidly as it travels through the pipe and only contacts a fraction of the buildup.
Enzyme-based drain cleaners are a step up because they’re designed to digest organic matter, but they work slowly, require repeated applications, and rarely reach biofilm deep inside the pipe. The most reliable approach is mechanical cleaning. Use a stiff drain brush to physically scrub the inside of the drain body and remove accessible buildup. Follow up with an enzyme cleaner if you like, but the brush does the real work.
For floor drains that aren’t used often, the problem is usually a dried-out trap seal that lets flies travel freely between the sewer line and your living space. Running water through the drain regularly keeps the trap seal full. Waterless drain seals with one-way silicone valves are a permanent fix for floor drains in basements, garages, or utility rooms: water flows down, but nothing comes back up.
Deal With Mosquitoes Already Inside
Mosquitoes that are already in your home are best handled individually or with an indoor aerosol space spray. Products containing pyrethrin or synthetic versions like allethrin work quickly in enclosed spaces. Close windows and doors before spraying, keep the room sealed for five to ten minutes afterward, then ventilate. Only use products specifically labeled for flying insects indoors.
A regular fly swatter is surprisingly effective for the one or two mosquitoes buzzing around a bedroom at night. Mosquitoes rest on walls and ceilings after feeding, making them easy targets in the morning.
To prevent more from entering, check window screens for tears and gaps around frames. Mosquitoes can fit through remarkably small openings. Eliminate any standing water inside your home: plant saucers, pet water bowls that sit for days, vases with stagnant water, and clogged drip trays under air conditioners are all potential breeding sites.
Why Bug Zappers Don’t Work for Mosquitoes
UV light bug zappers are one of the most common purchases people make for indoor mosquito control, and they’re one of the least effective. A University of Delaware study analyzed over 13,000 insects killed by bug zappers over 10 weeks. Less than 0.25% were mosquitoes. The other 99.75% were beneficial insects like pollinators and predators that happened to be attracted to UV light.
Female mosquitoes, the ones that bite, navigate primarily by sensing carbon dioxide, body heat, and skin chemicals. They’re simply not drawn to light traps the way moths and beetles are. Both the American Mosquito Control Association and Colorado State University Extension have concluded that bug zappers are ineffective for mosquito control. If you want a plug-in device, look for traps that use CO2 lures or fans to create suction, though even those work better outdoors than in a small room.
Safety Around Pets
If you have cats, be cautious with any insecticide containing permethrin or high-concentration pyrethrins. Cats lack the liver enzyme needed to break down permethrin efficiently, making them far more sensitive to it than dogs or humans. Exposure can cause muscle tremors, seizures, loss of coordination, and in severe untreated cases, death. Symptoms can appear within minutes or up to three days after contact.
Some permethrin products are labeled for dogs only, but cats can still be exposed through close physical contact with a recently treated dog. If you spray an aerosol insecticide in a room, keep cats out until the space is fully ventilated and surfaces have dried. For homes with cats, non-chemical methods like vinegar traps, sticky traps, drain brushing, and soil management are the safest first line of defense.
Putting It All Together
The fastest path to a bug-free home is a three-step approach: identify which insect you have, remove or treat its breeding source, and use traps or sprays to catch the remaining adults while the population dies off. For fungus gnats, expect two to three weeks of continued sightings after you dry out the soil, since eggs already laid will still hatch. Fruit flies clear faster once food sources are gone, usually within a week. Drain flies will keep returning until the biofilm in the pipe is physically removed.
Mosquitoes are the simplest to handle indoors because they’re usually not breeding inside your home. Once you kill or remove the ones that got in and seal entry points, the problem stops. The gnats are the stubborn ones, but consistent source elimination works every time.