How to Get Rid of Gnats in the Bathroom (and Keep Them Out)
If you've spotted tiny flies hovering near your sink or shower drain, you're not imagining things — you've got gnats in bathroom spaces, and they're one of the most common nuisances homeowners deal with. The good news is that getting rid of them is straightforward once you understand what's attracting them in the first place. This guide walks you through exactly what these insects are, why they love your bathroom, and how to eliminate them for good.
What Are Those Tiny Flies, Exactly?
Most of what people call "bathroom gnats" are actually one of two species: drain flies (also known as moth flies) or fungus gnats. Knowing which one you're dealing with makes treatment faster and more effective.
Drain Flies
Drain flies are small, fuzzy, and moth-like, usually about 1/8 inch long. They breed inside the organic slime that builds up on the inside walls of drains and pipes. You'll find them resting on walls near sinks, tubs, and shower drains. They're weak fliers, so they tend to hover in one spot rather than dart around the room.
Fungus Gnats
Fungus gnats are slender and dark, resembling tiny mosquitoes. They're more commonly associated with overwatered houseplants, but if you keep plants in your bathroom, they can easily take up residence there. Their larvae live in moist soil and feed on organic material and root systems.
Why Gnats Are Drawn to Your Bathroom
Bathrooms offer everything gnats need to survive: moisture, warmth, and organic matter. Here's what specifically lures them in:
- Slow or clogged drains: Standing water and decomposing organic buildup inside drains create a perfect breeding ground for drain flies.
- Wet surfaces: Consistently damp floors, grout lines, and the areas beneath bath mats provide the moisture gnats need.
- Organic debris: Hair, soap scum, and skin cells accumulate in drains and on surfaces, giving gnats a food source.
- Houseplants: A moisture-loving plant sitting on your vanity or windowsill can harbor fungus gnats if the soil stays too wet.
- Unsealed gaps: Cracks around pipes or poorly sealed drain covers let gnats enter from the sewer system.
How to Get Rid of Gnats in Bathroom Spaces Step by Step
Eliminating gnats in bathroom areas requires hitting them at multiple stages — adult insects, larvae, and the conditions that support breeding. Work through these steps in order for the best results.
Step 1: Identify the Source
Place a piece of clear tape, sticky side down, over each drain overnight. If you find tiny flies stuck to it in the morning, that drain is actively breeding them. Do this for the sink, shower, and bathtub drains so you know exactly where to focus your effort.
Step 2: Clean Your Drains Thoroughly
This is the single most important step. Boil a large pot of water and carefully pour it down the affected drain — this loosens the biofilm that drain flies breed in. Follow up with a drain brush or pipe brush to physically scrub the inside of the drainpipe as far down as you can reach. Then pour a mixture of baking soda and white vinegar (about half a cup of each) into the drain, let it foam for 20–30 minutes, and flush with hot water. Repeat this process every few days until the flies are gone.
For stubborn buildup, an enzyme-based drain cleaner works well. Enzyme cleaners digest organic matter without damaging your pipes, and they're safe for use around finished surfaces in your bathroom.
Step 3: Eliminate Adult Gnats
While you're treating the source, manage the adult population at the same time:
- Apple cider vinegar trap: Fill a small bowl with apple cider vinegar, add a drop of dish soap to break the surface tension, and cover with plastic wrap punctured with small holes. Gnats are attracted to the vinegar and get trapped.
- Sticky yellow traps: These are especially effective for fungus gnats. Place them near plants or on the vanity countertop.
- A fine-mesh drain cover: Install one over your drains to physically prevent gnats from exiting or entering through the drain opening.
Step 4: Dry Out the Environment
After showering, use a squeegee on tile walls and wipe down wet surfaces with a dry towel. Run the bathroom exhaust fan for at least 20 minutes after every shower or bath. If your bathroom lacks adequate ventilation, a small portable fan directed toward wet areas can make a significant difference. Gnats cannot establish a breeding population in a consistently dry environment.
Step 5: Address Houseplants
If you have plants in the bathroom, let the top two inches of soil dry out completely between waterings. You can also apply a layer of coarse sand or fine gravel on top of the soil — this deters female gnats from laying eggs. For serious infestations, a soil drench with a diluted hydrogen peroxide solution (one part 3% hydrogen peroxide to four parts water) kills larvae on contact without harming most plants.
Preventing Gnats From Coming Back
Once you've eliminated the current infestation, a few consistent habits will keep gnats from returning.
- Flush drains weekly: A weekly hot-water flush takes only seconds and prevents biofilm from accumulating to the point where it becomes a breeding site.
- Keep surfaces dry: Wipe down the sink basin, faucet base, and countertop after each use. A bathroom vanity with a well-sealed countertop and integrated sink is far easier to keep dry and clean than older designs with exposed seams where moisture can collect.
- Fix slow drains promptly: A sluggish drain is a warning sign. Don't wait for a full clog — clear it as soon as water starts draining slowly.
- Seal gaps around pipes: Use plumber's putty or silicone caulk to close any gaps where pipes enter the wall or floor. This cuts off a hidden entry point from the sewer system.
- Replace worn drain covers: Old drain covers with large openings or broken screens should be swapped for models with fine-mesh inserts.
- Upgrade your bathtub if drainage is an ongoing issue: Some older tubs with poor basin drainage and rough interior surfaces accumulate organic matter faster. A modern freestanding bathtub with a smooth, nonporous surface drains completely and is far less hospitable to the buildup that drain flies rely on.
When to Call a Professional
Most gnat problems resolve within two to three weeks of consistent treatment. However, if you've cleaned your drains repeatedly and the flies keep returning in large numbers, the source may be deeper in your plumbing — a cracked sewer pipe or a slow leak inside a wall can create a hidden breeding environment you can't reach with a drain brush. In that case, a licensed plumber should inspect the line. Persistent sewer gas odors alongside a gnat problem are a strong signal that something is wrong below the surface.
Frequently Asked Questions
Are bathroom gnats harmful to my health?
Drain flies and fungus gnats are generally considered a nuisance pest rather than a direct health threat. They don't bite, and there's no evidence they transmit disease to humans. That said, their presence does indicate unsanitary organic buildup in your drains, so eliminating them also improves overall bathroom hygiene.
How long does it take to get rid of a gnat infestation in the bathroom?
With consistent drain cleaning and moisture control, most infestations clear up within two to three weeks. Adult drain flies live about two weeks, so as long as you've destroyed the breeding site, the adult population will die off on its own. If you're still seeing large numbers of flies after three weeks of treatment, it's worth investigating whether there's a secondary source you've missed.
Can gnats come up through a bathroom drain that I rarely use?
Yes — in fact, rarely used drains are one of the most common sources of drain fly infestations. The P-trap beneath an unused drain can dry out, removing the water seal that normally blocks sewer access. Organic material also accumulates undisturbed in low-use drains. If you have a guest bathroom or a bathtub you seldom use, run water down those drains for a minute every week or two to keep the trap full and the pipe clear. A well-designed soaking bathtub used regularly actually helps prevent this problem — consistent use keeps water flowing and limits buildup.
Shop HomeBeyond
Upgrading your bathroom fixtures can make ongoing maintenance easier and give gnats fewer places to hide and breed. Explore our collection of freestanding bathtubs — crafted with smooth, nonporous surfaces that clean quickly and drain completely — and browse our full lineup of bathroom vanities designed with sealed finishes and integrated sinks that stand up to daily moisture. A well-designed bathroom is simply easier to keep clean.