How to Get Rid of Gnats in Your House

If you want to get rid of gnats in your house, stop chasing the tiny fliers and target where they breed. Indoors, “gnats” are usually fungus gnats from houseplant soil, or small flies from kitchens and drains. The fast fix is a simple sequence: identify which gnat you have, remove the moist organic source, trap the adults you see, and treat larvae if they keep coming back. Done in the right order, most infestations fade within 2-3 weeks.

Bottom line: Most indoor gnat problems come from one of three sources: wet houseplant soil, fermenting kitchen residue, or drain biofilm. Identify the source first, then treat that source directly.

  • For plant gnats, dry the top soil and use Bti or sticky cards.
  • For kitchen gnats, remove produce and rinse recycling.
  • For drain gnats, scrub the drain and treat the pipe walls.
Close-up of a gnat on a leaf, showcasing its intricate features and vibrant natural colors.

Quick answer

To get rid of gnats for good, match the control to the breeding site, not the adult swarm.

  • Around houseplants (most common): Fungus gnats
    Dry the top 1-2 inches of soil, use yellow sticky traps, and consider a larvicide like Bti.
  • Around fruit, trash, recycling: Fruit flies
    Remove fermenting foods, scrub residue, and use targeted kitchen traps.
  • Hovering near sinks or showers: Drain flies
    Physically scrub drain biofilm and fix slow drains or leaks.
  • Running fast on counters, near trash: Phorid flies
    Look for hidden organic buildup (trash juice, mop buckets, leaks) and clean thoroughly.

Mini-checklist (today):

  1. Put sticky traps by plants or a trap by the sink.
  2. Dry wet soil or clean the drain.
  3. Take out trash and rinse recycling.
Close-up of a gnat on a leaf, showcasing its intricate features and vibrant natural colors.

Identify first

Most people call any small indoor fly a “gnat,” but the label hides the real problem. Fungus gnats, fruit flies, drain flies, and phorid flies look similar at a glance, yet they breed in very different places. That is why one home remedy works in one room and fails in another.

Entomologists and extension programs consistently stress “source first” control. For example, the University of California IPM program notes fungus gnats thrive in moist potting media, while kitchen and drain pests require sanitation at the breeding site, not just swatting adults.

Fast ID cues (no magnifier needed)

Use these quick signals to narrow it down in under a minute:

  • Fungus gnats (Bradysia spp. and relatives)
    Where: hovering over potting soil, landing on plant pots, windows nearby
    Look: tiny, mosquito-like, dark-bodied, weak fliers
    Clue: you recently watered, soil stays damp, saucers hold runoff

  • Fruit flies (Drosophila spp.)
    Where: fruit bowl, recycling, compost, sticky spills
    Look: tan to brown, often with noticeable red eyes (not always obvious)
    Clue: worse after bananas, onions, or a forgotten potato ripens

  • Drain flies (Psychodidae)
    Where: sinks, showers, floor drains
    Look: fuzzy, moth-like wings; they rest on walls near drains
    Clue: they appear even when the kitchen is spotless

  • Phorid flies (Phoridae)
    Where: trash areas, under appliances, near leaks
    Look: small humpbacked flies that run more than they fly
    Clue: persistent, “mystery source” infestations

Simple “where are they coming from?” test

Try this tonight:

  1. Place a sticky trap at soil level in the worst houseplant.
  2. Cover a suspect drain with clear tape overnight (sticky side down, leaving small gaps for airflow).
  3. Set a small trap near fruit/trash.

In the morning, whichever station catches the most adults points to the breeding site.

What to do next: Once you know the source, you can pick the right fix. If you guess wrong, you can waste weeks spraying the air while larvae keep developing out of sight.

Get rid of gnats in houseplants

Recommended

Garden Safe Brand Houseplant & Garden Insect Killer2, 32 Fluid Ounces, Kills 100+ Listed Insects on Contact, For Use in Homes, Home Gardens & Home Greenhouses Up to Day of Harvest

Garden Safe · $10.00-15.00

This insect killer is effective against fungus gnats and can be used safely on houseplants, making it relevant for readers dealing with gnats in their homes.

Pros

  • Kills a wide range of listed insects quickly on contact
  • Easy to use ready-to-spray bottle for houseplants, gardens, and greenhouses
  • Can be used up to the day of harvest on edible crops
Cons

  • Some users report needing repeat applications for ongoing infestations
  • Spray can be messy or difficult to control on delicate plants

Check Price on Amazon →

If the gnats cluster around pots, you are almost always dealing with fungus gnats. Adults are annoying, but larvae are the engine of the problem. Larvae live in moist organic potting mix and feed on fungi and decaying material. In heavy infestations, they can also nibble fine roots, especially on seedlings and delicate plants.

Warm indoor temperatures speed things up. Guidance summarized by extension and horticulture organizations shows fungus gnat life cycles can complete in a few weeks indoors, so populations can surge if soil stays consistently wet. The University of California IPM program emphasizes moisture management as the foundation of control.

Step-by-step plan (in the right order)

Follow this sequence for the best odds of a clean break:

  1. Dry the top layer (most important)
    Let the top 1-2 inches (2.5-5 cm) of potting mix dry before watering again.
    Action tip: push a finger into the soil. If it is damp at your first knuckle, wait.

  2. Stop “wet feet”
    Empty saucers and cachepots so roots do not sit in runoff.
    Action tip: water in the sink, let the pot drain fully, then return it.

  3. Clean the soil surface
    Remove dead leaves, fallen petals, and any moldy debris.
    Action tip: this removes food for fungi and larvae.

  4. Trap adults to measure progress
    Use yellow sticky cards placed right at the soil line.
    Action tip: traps reduce the number of egg-laying adults and show whether your steps are working.

  5. Treat larvae if adults keep appearing
    Bti (Bacillus thuringiensis israelensis) is widely used against fly larvae in wet organic habitats. Apply as directed and repeat on schedule.
    Action tip: treat all nearby pots, not just the “worst” one.

Visual checklist: fungus gnat control

  • Do now:

    • Let soil dry between waterings
    • Empty saucers
    • Add sticky traps near soil
  • Do this week:

    • Remove decaying debris
    • Consider Bti if traps keep filling
    • Quarantine new plants away from the collection
  • If severe:

    • Repot into fresh, clean potting mix
    • Wash the pot before reusing it

Common mistakes that keep them coming back

  • Watering on a calendar instead of by soil moisture
    Plants do not drink on the same schedule in winter vs summer.

  • Only treating the adults
    Adults live briefly. Larvae in soil keep replacing them.

  • Fixing one pot while others stay wet
    Adults move pot-to-pot. Treat the whole cluster.

For trap options that work beyond houseplants (and for general indoor fly pressure), see our guide to Best Fly Traps for Indoor and Outdoor Use.

Indoor scene with potted plants and signs of gnats in the soil, illustrating a common habitat.

Kitchen and drain fixes

Recommended

Catchmaster Fly Ribbon 20-Pack, Bug & Fruit Fly Traps Outdoor and Indoor, Premium Adhesive Sticky Strips & Gnat Hanging Strips, Bulk Flying Insect Paper Rolls, Pesticide-Free Home Pest Control

Catchmaster · $8.00-12.00

These sticky traps are perfect for capturing adult gnats and fruit flies, which is a key strategy mentioned in the article for managing infestations.

Pros

  • Very effective at catching a large number of flies and other small flying insects quickly
  • Non‑toxic, pesticide‑free design that’s safe to use around homes, barns, and indoor areas
  • Simple, inexpensive, and easy to hang or place in a variety of locations indoors and outdoors
Cons

  • Can be messy or difficult to handle because the adhesive is extremely sticky and can get on hands or nearby surfaces
  • Appearance and hanging ribbons can be unsightly, and removal/disposal can be inconvenient once full

Check Price on Amazon →

Sometimes “gnats” are not coming from plants at all. Kitchens create two prime breeding zones: fermenting food residue (fruit flies) and drain biofilm (drain flies). The good news is that these problems are usually solved by removing the breeding material, not by foggers or room sprays.

The University of Florida IFAS Extension repeatedly emphasizes accurate identification and source removal for indoor fly pests. In practice, that means you clean what the larvae eat and live in.

Fruit flies: remove the fermentation source

Fruit flies breed in thin films of sugary, yeasty residue. A kitchen can look clean and still have enough buildup to support them.

Do these in order:

  1. Discard or refrigerate produce (especially bananas, tomatoes, onions).
  2. Empty trash and compost daily for a week.
  3. Rinse recycling – bottles and cans matter more than people think.
  4. Deep-wipe hotspots: under the fruit bowl, around the trash rim, under appliance edges, and sticky cabinet handles.
  5. Set a targeted trap near the source, not across the room.

If you want a trap-focused approach, our roundup of Best Fruit Fly Traps: Effective Kitchen Solutions breaks down what works and where to place it.

Mini visual: fruit fly hotspot list

  • Trash can lip and lid hinges
  • Recycling bin bottom “soup”
  • Compost pail rim
  • Under toaster or coffee station
  • Forgotten produce (including potatoes) in a cabinet

Drain flies: scrub the biofilm

Drain flies are strongly tied to organic slime inside drains, overflow channels, and sometimes around loose seals. Pouring chemicals down the drain often fails because it does not remove the layer larvae live in.

Best approach: mechanical cleaning

  • Use a stiff drain brush to scrub the inside walls.
  • Clean the overflow opening in bathroom sinks.
  • Flush with hot water after scrubbing.
  • Fix slow drains and leaks that keep areas wet.

For product-style options that pair well with scrubbing, see Top Drain Fly Treatments and Gel Cleaners.

What about “mystery gnats” (phorid flies)?

If you see small flies that run quickly on counters or cluster near trash, look for hidden moisture and organic buildup:

  • trash juice under the bag
  • dirty mop water left overnight
  • a leak under the sink
  • food debris under the refrigerator

Action tip: clean and dry the area, then monitor with a trap for 7 days. If numbers do not drop, the source may be in plumbing or a wall void.

Traps and treatments

Recommended

SUMMIT CHEMICAL CO 117-6 30OZ Mosquito Bits

Summit · $15.00-20.00

This product is a natural larvicide that can help eliminate gnat larvae in potting soil, addressing the breeding source as suggested in the article.

Pros

  • Effectively kills mosquito larvae and helps control fungus gnats
  • Easy to use in standing water or plant containers
  • Generally viewed as safe around pets, birds, fish, horses, livestock, and beneficial insects
Cons

  • Some reviewers say the recommended amount is not strong enough for fungus gnats
  • Users sometimes want a larger or more convenient package size

Check Price on Amazon →

Traps are useful, but they work best as part of a plan. Think of them like a scoreboard: they show where the activity is and whether your source control is working. They rarely solve an infestation alone, especially when larvae are developing in soil or drains.

According to guidance summarized by the University of California IPM program, monitoring tools like sticky traps help reduce adult fungus gnats and track population trends, but moisture and habitat changes drive long-term success.

Trap types (and when to use each)

Yellow sticky traps (best for fungus gnats)

  • Best placement: at soil level, near the pot rim
  • Best use: monitoring and reducing egg-laying adults
  • Watch out: they fill fast in heavy infestations, replace weekly

Kitchen fly traps (best for fruit flies)

  • Best placement: within 1-3 feet of the suspected source
  • Best use: while you remove fermenting residue
  • Watch out: if you do not remove the source, traps become a “collection hobby”

Drain monitoring

  • Best placement: tape test overnight, or a trap near the drain
  • Best use: confirming the drain is the source
  • Watch out: adults may rest on walls away from the drain, so confirm with a test

Vacuuming (fast knockdown)

  • Best placement: windows, plant area, under cabinets
  • Best use: immediate reduction while you fix the source
  • Watch out: it is temporary but satisfying

Larval control for fungus gnats (when drying is not enough)

If you are already letting soil dry and still catching many adults after 7-10 days, target larvae.

Options commonly used in IPM programs:

  • Bti drenches (often sold for mosquito larvae)
    Works by targeting certain fly larvae in moist media. Apply as directed and repeat to catch new hatchlings.

  • Beneficial nematodes (often Steinernema feltiae)
    Useful in some indoor setups, especially when you have many plants and want a non-chemical approach.

Practical tip: treat all pots in the same area at the same time. Otherwise, untreated pots act like a nursery.

Conventional sprays: when they make sense (and when they do not)

A quick knockdown spray can reduce adults, but it does not fix breeding sites. Use sprays only if:

  • you have identified the pest correctly,
  • you can treat the source,
  • and you follow the label exactly.

For many indoor “gnat” cases, sprays are optional. Moisture control and sanitation do the heavy lifting.

Visual: 7-day action plan

Day 1:

  • Identify source zone (plants vs kitchen vs drains)
  • Set traps
  • Start drying soil or cleaning drains

Days 2-3:

  • Sanitation sweep (trash, recycling, wipe residue)
  • Replace sticky traps if loaded

Days 4-7:

  • Apply larval control if needed (Bti or nematodes for plants)
  • Keep moisture down
  • Re-check counts on traps
Person inspecting a houseplant for gnats, surrounded by gardening tools and natural light.

Prevention

Once indoor gnats are gone, prevention is mostly habit and setup. The goal is to avoid the constant moisture and organic buildup that larvae need. This is where most “recurring gnat” stories begin: the adults disappear, watering goes back to normal, and the next generation quietly starts.

Houseplant prevention that actually works

  • Water based on soil feel, not routine
    In winter, many plants need far less water.

  • Improve drainage
    Use pots with drainage holes. Avoid decorative cachepots that trap water.

  • Bottom-water carefully
    Bottom watering can reduce surface moisture, but do not leave pots soaking for hours.

  • Remove surface debris
    Dead leaves and moldy bits are larval food.

  • Quarantine new plants for 1-2 weeks
    Many infestations arrive from a nursery pot that was kept constantly moist.

Kitchen and bathroom prevention

  • Keep fruit in the fridge when possible during warm months.
  • Rinse recycling and take it out regularly.
  • Scrub drains periodically, especially if you notice slow flow.
  • Fix leaks quickly. A damp cabinet base can support fly breeding.

When to call a professional

Consider professional pest control if:

  • you suspect phorid flies from a hidden plumbing issue,
  • you have gnats in multiple rooms with no clear source,
  • you see persistent activity after 3 weeks of source control.

A pro can help locate breeding sites in drains, wall voids, or under slabs, where DIY efforts cannot reach.

Conclusion

To get rid of gnats, focus on the breeding site: dry out overwatered houseplant soil for fungus gnats, remove fermenting residue for fruit flies, and scrub drain biofilm for drain flies. Traps help you monitor and reduce adults, but lasting results come from moisture control, sanitation, and larval treatment when needed.

Next step: set one trap where you see the most activity today, then commit to a 7-day source-control sprint. For more targeted help, see our guides to Best Fruit Fly Traps: Effective Kitchen Solutions and Top Drain Fly Treatments and Gel Cleaners.

As an Amazon Associate, I earn from qualifying purchases. Product recommendations are based on real reviews and independent research.

Author

  • Sophia's passion for various insect groups is driven by the incredible diversity and interconnectedness of the insect world. She writes about different insects to inspire others to explore and appreciate the rich tapestry of insect life, fostering a deep respect for their integral role in our ecosystems.

    View all posts

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top