Tiny flying insects hovering around your kitchen sink, houseplants, or fruit bowl can quickly become frustrating. You might eliminate a few, only to discover another swarm the next morning.
Learning how to get rid of gnats starts with identifying the insects, locating their breeding sites, and removing the conditions that allow them to multiply.
The most effective way to get rid of gnats is to eliminate their breeding source. Remove overripe produce, clean drains, reduce excess moisture in houseplant soil, and dispose of decaying organic matter. Sticky traps and vinegar traps can capture adults, but lasting control requires addressing eggs and larvae.
What Are Gnats, and Why Are They in Your House?
The word gnat describes several types of small flying insects. Not all insects commonly called gnats belong to the same family, and their preferred habitats differ.
The insects you find around houseplants may be completely different from those gathering near your kitchen trash can.
Common Types of Gnats Found Indoors
| Insect | Appearance | Common location | Main attraction |
|---|---|---|---|
| Fungus gnats | Tiny, dark, mosquito-like flies | Houseplants | Moist potting soil and fungi |
| Fruit flies | Small tan or brown flies, sometimes with red eyes | Kitchens | Fermenting fruits and food |
| Drain flies | Small, fuzzy, moth-like flies | Sinks and drains | Organic buildup in plumbing |
| Phorid flies | Small flies with a humpbacked appearance | Drains, garbage, damp areas | Decaying organic material |
Identifying the insect matters because a treatment that works for fruit flies may do very little against fungus gnats.
For example, an apple cider vinegar trap often attracts fruit flies but is usually less effective for fungus gnats.
Why Do Gnats Suddenly Appear?
Small flies can appear seemingly overnight because their breeding conditions have become favorable.
Common causes include:
- Overwatered indoor plants.
- Ripe or rotting fruit left on countertops.
- Food residue in garbage disposals.
- Moist organic buildup inside drains.
- Uncovered compost or trash.
- Damp cleaning cloths and spills.
- Contaminated potting soil brought indoors.
Warm temperatures and available moisture can accelerate insect development.
A few adults may produce a noticeable infestation when suitable breeding material remains undisturbed.
How to Get Rid of Gnats Quickly
If small flies are already circulating throughout your home, begin by addressing the areas where they are most active.
The goal is to capture existing adults while preventing another generation from emerging.
Step 1: Identify Where the Gnats Are Coming From
Observe where the insects gather.
If they fly around plant pots, inspect the soil. If they hover near bananas, tomatoes, or a recycling bin, look for fermenting food. If they cluster around sinks, inspect the drain and surrounding plumbing.
You can also use monitoring traps to narrow down the source.
Yellow sticky cards near plants help detect fungus gnats. A covered vinegar trap near a fruit bowl can help reveal fruit fly activity.
Step 2: Remove Food and Breeding Materials
Start with a thorough inspection of the kitchen and nearby rooms.
Discard spoiled produce, rinse bottles and cans before recycling, empty trash containers, and clean food residue from countertops.
Check hidden areas, including beneath appliances and inside trash cans.
Even a small amount of decomposing food can support breeding.
Step 3: Capture Adult Flies
Traps help reduce the number of flying adults.
For fruit flies, use a vinegar trap. For fungus gnats, position yellow sticky traps close to plant soil.
Vacuuming visible adults can also provide temporary relief, especially around windows.
However, removing adults alone rarely solves an established infestation.
Step 4: Eliminate Moisture Problems
Inspect damp soil, leaking pipes, wet sponges, and standing water.
Allow plant soil to dry appropriately between watering sessions and repair plumbing leaks.
Reducing excess moisture makes many indoor environments less suitable for insect reproduction.
Step 5: Monitor for New Activity
Continue monitoring after the number of adult insects decreases.
New flies may emerge from eggs or larvae already present before cleaning began.
A sustained reduction in catches, combined with the absence of new breeding material, is a better sign of successful control than one fly-free afternoon.
How to Get Rid of Gnats in the Kitchen
Kitchens offer small flies several food sources, including ripe produce, beverage residue, compost, and dirty drains.
Fruit flies are particularly common in these environments.
Make an Apple Cider Vinegar Trap
A simple homemade trap can capture many fruit flies.
You will need:
- A small bowl or jar.
- Apple cider vinegar.
- A drop of liquid dish soap.
- Plastic wrap, if desired.
Pour a little vinegar into the container and add a small drop of dish soap.
Place it near the area where fruit flies are gathering, away from children and pets.
The fermented smell attracts some fruit flies. The soap reduces the liquid’s surface tension, making it harder for insects to remain on the surface.
Alternatively, cover the container with plastic wrap and make several small holes.
Important: Vinegar traps primarily target adult fruit flies. They do not reliably eliminate fungus gnats or remove breeding material.
Remove Hidden Kitchen Attractants
Inspect locations that are easy to overlook:
- Under the refrigerator.
- Around the dishwasher.
- Inside recycling containers.
- Beneath fruit storage baskets.
- Around garbage disposal openings.
- Behind kitchen appliances.
Clean sticky residues from juice, soda, wine, and other beverages.
Store ripe fruit in the refrigerator when appropriate, and discard produce that has begun decomposing.
Keep Trash and Compost Containers Clean
Empty food waste frequently and wash bins with detergent and water.
Allow containers to dry before replacing liners.
If you compost indoors, use a suitable covered container and empty it regularly.
These measures reduce the fermenting material that attracts fruit flies.
How to Get Rid of Gnats in Houseplants
Fungus gnats are among the most common small flies associated with indoor plants.
Adult fungus gnats are generally more of a nuisance than a threat to people. Their larvae live in moist growing media and feed on fungi, decomposing organic matter, and sometimes tender roots.
Large larval populations can damage seedlings, cuttings, and vulnerable plants.
Let the Top Layer of Soil Dry
Excessively moist potting mix creates favorable conditions for fungus gnats.
For plants that tolerate drying between waterings, allow the upper portion of the soil to dry before adding more water.
Check moisture below the surface rather than relying only on appearance.
Do not deliberately dry out plants that require consistently moist growing conditions.
The correct watering schedule depends on the plant species, container size, growing medium, temperature, and light.
Use Yellow Sticky Traps
Place yellow sticky cards just above the potting mix or close to the soil surface.
These traps catch adult fungus gnats and help monitor activity.
Replace them when they become covered with insects or dust.
Sticky traps do not kill larvae living inside the potting mix, so they work best alongside soil management.
Treat Fungus Gnat Larvae With BTI
Bacillus thuringiensis subspecies israelensis, commonly abbreviated BTI, is a microbial insecticide used against certain fly larvae.
Some BTI products are labeled for fungus gnat larvae in growing media.
When an appropriately labeled product is applied according to its directions, it can help interrupt the insect life cycle.
Use only products approved for the intended application and follow the label’s dilution, application, and repeat-treatment instructions.
BTI targets susceptible larvae rather than adult flies.
Consider Beneficial Nematodes
The beneficial nematode Steinernema feltiae is another biological control option for fungus gnat larvae.
These microscopic organisms seek susceptible insect hosts in moist growing media.
Their effectiveness depends on suitable temperatures, adequate moisture, product viability, and proper application.
Unlike simply allowing the soil to dry, nematode treatments require conditions that support the living organisms.
Improve Potting Soil and Drainage
Healthy potting conditions discourage repeated infestations.
Use containers with functioning drainage holes, empty excess water from saucers, and avoid leaving organic debris on the soil surface.
If the potting mix is decomposed, compacted, or chronically waterlogged, repotting into fresh, suitable medium may help.
Inspect new houseplants before placing them near an existing collection.
How to Get Rid of Gnats in Drains
Tiny flies gathering near a bathroom or kitchen sink may be drain flies, phorid flies, or other insects associated with moisture and decomposing material.
Drain flies often develop in the slimy organic film that accumulates inside drains and plumbing fixtures.
Confirm Whether the Drain Is the Source
Inspect the drain opening for adult insects.
You can place a clear adhesive monitoring strip near the opening without sealing the drain or obstructing airflow. Check whether flies are caught after a period of inactivity.
Finding flies near a sink does not automatically prove they are breeding inside the drain.
Nearby leaks, floor drains, garbage, or hidden damp areas may be responsible.
Physically Clean the Drain
Removing the organic film is usually more effective than pouring household chemicals down the drain.
Use an appropriate drain brush to scrub accessible surfaces, including the drain opening and removable stopper components.
Clean accumulated hair, grease, and other debris.
Where appropriate, follow with an enzyme-based or microbial drain-cleaning product labeled for the intended use.
Some infestations require repeated cleaning because organic material can accumulate deeper in the plumbing.
Avoid Common Drain-Cleaning Mistakes
Pouring boiling water into drains is not a reliable long-term insect-control strategy and may damage certain plumbing components.
Bleach alone may not penetrate or remove the film where larvae develop.
Never mix bleach with vinegar, ammonia, acids, or other cleaning products because dangerous gases can form.
If flies continue emerging despite cleaning, investigate concealed leaks, damaged plumbing, and inaccessible organic buildup.
Natural Ways to Get Rid of Gnats Without Harsh Chemicals
Many indoor small-fly problems can be controlled through sanitation, moisture management, trapping, and biological treatments.
The best natural method depends on the insect involved.
| Method | Best suited for | Limitation |
|---|---|---|
| Apple cider vinegar trap | Adult fruit flies | Does not eliminate eggs or larvae |
| Yellow sticky traps | Adult fungus gnats | Does not treat soil larvae |
| Allowing appropriate soil drying | Fungus gnats | Not suitable for all plants |
| Drain brushing | Drain flies | May require repeated cleaning |
| Removing spoiled produce | Fruit flies | Other breeding sites may remain |
| BTI treatment | Susceptible fungus gnat larvae | Requires a suitable labeled product |
| Beneficial nematodes | Fungus gnat larvae | Need proper environmental conditions |
Do Essential Oils Repel Gnats?
Peppermint, eucalyptus, citronella, and other essential oils are frequently promoted as insect repellents.
However, evidence supporting their reliable elimination of indoor fungus gnat, fruit fly, or drain fly infestations is limited.
Some odors may temporarily affect insect behavior, but essential oils do not reliably eliminate breeding sources.
Concentrated essential oils can also irritate skin, harm certain plants, and present risks to pets.
They should not replace proven sanitation and source-control measures.
Does Hydrogen Peroxide Kill Fungus Gnats?
Hydrogen peroxide is sometimes recommended as a homemade soil drench.
Although concentrated or improperly applied peroxide can damage living organisms, household peroxide treatments are not a consistently validated first-choice solution for fungus gnats.
Incorrect concentrations or repeated use may injure roots and disrupt soil microorganisms.
Proper watering, sticky monitoring traps, and labeled biological controls are more predictable approaches.
Can Cinnamon Stop Fungus Gnats?
Cinnamon is often suggested because some cinnamon compounds show antifungal activity under laboratory conditions.
However, sprinkling kitchen cinnamon on potting soil has not been established as a reliable way to eliminate fungus gnat infestations.
It should not be treated as a substitute for managing soil moisture or targeting larvae.
How Long Does It Take to Get Rid of Gnats?
The time required depends on the insect species, infestation size, temperature, and whether breeding sources have been eliminated.
| Type of infestation | Typical control timeframe | Main factor |
|---|---|---|
| Fruit flies | Several days to 2 weeks | Removing fermenting food |
| Fungus gnats | Approximately 2–4 weeks | Managing soil moisture and larvae |
| Drain flies | Several days to several weeks | Removing drain biofilm |
| Recurring infestations | Potentially longer | Finding hidden breeding sources |
These are general estimates, not guarantees.
Fruit flies can complete their life cycle in approximately 8–10 days under favorable conditions. Fungus gnats often require three to four weeks to develop from egg to adult.
University of Maryland Extension
+1
That explains why adult insects may continue appearing even after the initial cleaning.
Why Do Gnats Keep Coming Back?
Recurring infestations usually indicate that breeding material remains available.
For fungus gnats, the problem may be consistently wet potting soil. For fruit flies, it may be forgotten produce or residue inside a recycling container.
Drain-associated flies may persist when inaccessible organic buildup or plumbing defects remain.
If the insects return after treatment, focus on locating the source rather than simply increasing the number of traps.
How to Prevent Gnats From Returning
Prevention is easier when you understand what attracts each type of fly.
A few consistent housekeeping and plant-care habits can substantially reduce future infestations.
Maintain a Clean Kitchen
Wash dishes promptly, wipe food spills, and regularly clean trash and recycling containers.
Check produce for spoilage and refrigerate susceptible ripe fruit.
Avoid leaving open containers of juice or other fermentable liquids on countertops.
Water Houseplants Correctly
Water according to each plant’s needs rather than following an inflexible schedule.
Check soil moisture, provide suitable drainage, and avoid allowing pots to sit in excess water.
For suitable plants, bottom watering can help keep the soil surface less attractive to egg-laying fungus gnats.
University extension guidance consistently emphasizes moisture management as a central part of fungus gnat prevention.
University of Maryland Extension
+2
Inspect New Plants and Potting Mix
Before bringing plants indoors, examine the soil surface and watch for small flying insects.
Keep newly acquired plants separate from established houseplants temporarily if you suspect an infestation.
Use clean containers and suitable potting media when repotting.
Maintain Drains and Plumbing
Remove accessible buildup from drain openings and clean fixtures regularly.
Repair leaks promptly and investigate persistent dampness beneath sinks.
For infrequently used drains, ensure the plumbing trap contains water.
If an infestation continues despite thorough cleaning, a plumbing inspection may be necessary.
Keep Window Screens in Good Condition
Not every small flying insect originates indoors.
Outdoor midges and other gnat-like insects may enter through open windows, damaged screens, or gaps around doors.
Repair screens and improve sealing where insects regularly enter.
Reducing unnecessary outdoor lighting near open entryways may also help with some light-attracted species.
Are Gnats Harmful to Humans, Pets, or Plants?
Most common indoor fungus gnats, fruit flies, and drain flies are primarily nuisance pests.
Fungus gnats generally do not bite people. Their larvae, however, can affect young or weakened plants when populations become large.
Fruit flies can move between decaying food and food-preparation surfaces, making sanitation especially important.
Drain flies are usually more of a nuisance than a direct health threat, but their presence can indicate unsanitary organic buildup or moisture problems.
Not all insects described as gnats are harmless. Some outdoor biting midges and black flies can bite humans and animals.
If you experience bites, do not assume the insects are ordinary household fungus gnats.
Correct identification is essential before choosing a treatment.
Common Mistakes That Make Gnat Infestations Worse
Several popular approaches provide temporary relief without solving the underlying problem.
Relying only on vinegar traps: These can capture adult fruit flies, but they cannot eliminate larvae hidden in fermenting material.
Spraying flying insects repeatedly: Adult-focused treatments often miss the immature stages developing in soil, drains, or food waste.
Overwatering plants after treatment: Continuing to saturate potting soil can recreate the same conditions that supported the original infestation.
Using the wrong trap: Fruit fly vinegar traps are generally unsuitable for fungus gnat monitoring. Yellow sticky cards are a better option around houseplants.
Wisconsin Horticulture
Ignoring nearby moisture sources: A damp mop, leaking pipe, or neglected floor drain may support repeated insect activity.
Mixing household chemicals: Combining cleaning agents can create serious health hazards without improving insect control.
The most reliable approach is to match the treatment to the insect and its breeding environment.
When Should You Contact a Pest Control Professional?
Most minor indoor small-fly infestations can be managed without professional pesticide treatment.
However, professional identification or inspection may be appropriate when:
- Large numbers of flies persist after several weeks of source control.
- Insects appear to emerge from walls, floors, or inaccessible plumbing.
- You suspect a concealed sewage leak.
- Repeated drain cleaning fails to reduce activity.
- You cannot identify the insects or locate their breeding site.
A qualified pest management professional can help distinguish similar-looking species and identify conditions that routine household cleaning may miss.
For suspected plumbing defects, a licensed plumber may be more appropriate than insecticide treatment.
Final Thoughts on how to get rid of gnats
The key to learning how to get rid of gnats is understanding that not every tiny flying insect requires the same solution.
Fruit flies respond best to removing fermenting food and cleaning kitchen surfaces. Fungus gnats require attention to moist potting soil, adult monitoring, and sometimes biological larval control. Drain flies are best addressed by removing organic buildup and correcting moisture problems.
Start by identifying where the insects are breeding, remove that source, and use suitable traps to monitor progress.
With consistent cleaning, appropriate plant watering, and targeted treatment, most common indoor gnat infestations can be brought under control without relying on repeated chemical spraying.