Gnats are tiny, pesky flies that seem to appear out of nowhere in kitchens and around houseplants. They thrive in warm, damp places and are drawn to organic matter like overripe fruit or moist potting soil.
While a few buzzing around are mostly just an annoyance, a growing infestation can ruin your peace of mind (and your plants)! The good news is that you can evict gnats with a few simple steps.
In this article, we’ll explain why gnats appear, how to identify the different types (fruit flies, fungus gnats, drain flies), and share practical, natural methods and traps to get rid of gnats in the house for good. You’ll also learn prevention tips to keep these pests from returning.
What Are Gnats and Why Are They in Your House?
“Gnats” is a general term for several types of tiny, mosquito-like flies that invade homes. They are non-biting flies, but they can become a nuisance in large numbers.
The three most common indoor gnats are fruit flies, fungus gnats, and drain flies. All of these are attracted by moisture and decaying organic material.
Fungus Gnats

Fungus gnats are tiny, dark flies often seen around potted plants. Adults are delicate with long legs and antennae, resembling very small mosquitoes.
They are drawn to damp soil and organic debris, where they lay eggs. The white, legless larvae live in the top inch of soil and feed on fungi and decaying plant matter (and sometimes fine plant roots).
Overwatering plants and using soil rich in organic material encourage fungus gnats. You might notice adults flying around plant leaves or skittering on the soil surface.
Fruit Flies

Fruit flies (also called vinegar flies) are those little tan or brown flies with red eyes that cluster around bananas and other fruit. They range in color from tan to nearly black.
Fruit flies are most active in kitchens or anywhere food is stored or disposed of. They breed in fermenting produce, garbage disposals, and even drains.
Females can lay hundreds of eggs on the surface of ripe or rotting fruits and veggies.
Unlike fungus gnats, fruit flies are attracted to the smell of fermenting sugars and often hover near fruit bowls, trash bins, or garbage bags.
Drain Flies
Drain flies (moth flies) are the fuzzy, moth-like flies you sometimes see in bathrooms or kitchens. They’re about 1/16 to 1/4 inch long and light brown or gray.
The adults often rest on walls or near sinks. Drain flies breed in the slimy film inside drain pipes, septic tanks, and anywhere water stands.
Their larvae (sometimes called drain worms) feed on the bacteria in that slime.
A common clue to drain flies is seeing them emerge in the shower or kitchen sink – this means your drain or pipes have organic buildup that needs cleaning.
…
You’ll often find gnats indoors because your home provides exactly what they need: moist breeding sites and food. Overwatered plant soil, unsealed bowls of ripe fruit, dirty drains, and trash cans with food residue are all invitations for gnats.
The key to stopping them is to remove these attractants and interrupt their life cycle with traps and cleaning.
If you’re already dealing with pests in your plants, you might also want to learn how to make homemade insecticidal soap to control common garden pests naturally.
How to Tell Them Apart
- Eyes and Color: Fruit flies have large red eyes and a rounded body. Fungus gnats have dark bodies and smaller, less noticeable eyes. Drain flies look fuzzy and moth-like rather than smooth-bodied.
- Where You See Them: If they’re fluttering near fruit or trash, they’re likely fruit flies. If they’re around potted plants or houseplants, probably fungus gnats. If they’re on walls near sinks or drains and appear moth-like, they’re drain flies.
- Habitats: Fungus gnats come from wet soil, fruit flies from fermenting foods or drains, and drain flies from drain slime. Identifying the source helps you target the right solution.
How to Get Rid of Gnats in the House
Use a combination of traps, plant care, and cleaning to break the gnat life cycle. Here are methods that actually work:
Apple Cider Vinegar (ACV) Trap
The classic DIY method is a vinegar trap. Pour about ¼ cup of apple cider vinegar (or white vinegar) into a small jar or bowl, add a tablespoon of sugar, and then a few drops of liquid dish soap.
Cover the jar with plastic wrap (or foil) and poke several tiny holes in it. The sweet, fermenting smell of vinegar attracts gnats, and the soap breaks the surface tension of the liquid so the flies can’t escape and eventually drown.
Place these traps wherever you see flying gnats (e.g. near fruit bowls or plants).
Refresh the vinegar mixture every few days. This trap works for fruit flies and can capture adult fungus gnats flying near plants.
Bottle or Jar Funnel Trap
Another simple trap is made from a plastic bottle or a jar with a paper funnel. For example, cut the top third off a soda bottle, invert it as a funnel, and tape it back onto the bottom.
Pour some bait (apple cider vinegar, wine, beer, or even a piece of ripe fruit) into the bottom. Gnats enter the funnel for the lure but have difficulty finding the way out.
Similarly, you can put fruit scraps (like banana peels) in a jar and use a paper cone funnel taped inside the top. Once the trap is full of flies, throw it out and make a new one.
Sticky Traps for Plants

For fungus gnats, yellow sticky fly paper (available at garden stores) is very effective. Insert sticky strips or yellow sticky cards into the soil of infested pots or hang them near plants.
Adult fungus gnats are attracted to the bright yellow and will get stuck. This reduces the breeding population by catching adults before they can lay eggs.
Change the traps regularly and replace them once they’re full of insects.
Household Bleach or Hydrogen Peroxide
For drain flies or larvae in plant soil, treatments can help kill larvae.
For drain flies, pour a half cup of baking soda followed by a cup of vinegar down the drain, let it fizz for a few minutes, then flush with boiling water (or an over-the-counter bio drain cleaner).
This helps remove the organic gunk where drain flies breed. For fungus gnats in soil, gardeners often use a diluted hydrogen peroxide solution.
If you prefer chemical-free methods, explore our guide on the best natural pest control solutions for your garden.
Mix one part 3% hydrogen peroxide with four parts water and water your plants with it. The bubbling action kills gnat larvae in the soil without harming most plants.
(Use this only as a periodic soil drench, not on leaves.)
Clean Drains and Garbage
Eliminate drain and kitchen breeding sites. Clean sink and shower drains with a pipe brush or drain cleaner and flush with hot water.
If you’re not sure which drain is the source, tape a small oil-coated cup (sticky side out) over each drain for a few days to see if flies get caught.
Also clean garbage cans, compost bins, and recycling containers. Avoid leaving dirty dishes or trash bags with food scraps lying around.
Remove Food Sources

Discard or refrigerate overripe fruits and vegetables as soon as possible. Clean up spills of juice or soda, and don’t leave uncovered food out.
Take out the kitchen trash and recycling regularly, especially if they contain food waste. Wipe down countertops and mops or brooms that might have stuck-on fruit bits.
Even a few drops of juice behind the refrigerator or in a cupboard can sustain thousands of fruit flies. Good sanitation will starve out the flies.
Dry Out Houseplant Soil

If fungus gnats are a problem, let the soil dry more between waterings. Most houseplants tolerate a drying of the top inch or two, which will interrupt the gnats’ life cycle.
In moist soil, fungus gnats can breed very quickly. By watering sparingly and keeping plants well-drained, you make the habitat inhospitable.
You can also top-dress the soil with a layer of coarse sand or diatomaceous earth, which deters females from laying eggs.
If an infestation is severe, repot the plant in fresh, sterile soil and discard the old infested soil.
A simple glass jar can become an effective gnat trap. Fill a jar with a mixture of apple cider vinegar, a spoonful of sugar, and a drop of dish soap, and cover it with plastic wrap with small holes.
Place the trap in problem areas; flies will enter for the sweet scent and drown in the liquid.
If you enjoy gardening, many homesteaders use natural pest prevention techniques.
For example, using eggshells as organic pest control is another simple way to discourage certain pests around plants.
Natural Remedies for Gnats
All the methods above are safe and do not rely on harsh chemicals, making them ideal for homes with pets and children.
Here are more non-toxic, natural approaches:
Vinegar Cleaning
Not only in traps, but plain white vinegar is a great natural cleaner that also repels gnats.
Wiping counters, sinks, and drain edges with white vinegar removes the sweet residues and odors that attract gnats.
For example, spray or wipe a 1:1 water-vinegar solution around kitchen surfaces and let it dry. This removes sticky film and discourages gnats from hanging around.
Soap and Water Spray

A mild spray of soap and water (or insecticidal soap) can knock down gnats on contact. Mix a few drops of dish soap in a spray bottle of water and mist plants or sinks where you see gnats resting.
It won’t kill them instantly, but it will interfere with their ability to fly and can dislodge them. (Safety note: Use plant-friendly soap if spraying foliage.)
Diatomaceous Earth (Food Grade)
This powdery natural substance can be sprinkled on the soil surface of potted plants. It’s safe for people and pets but lethal to soft-bodied insect larvae.
The microscopic sharp edges of diatomaceous earth (DE) cut into insect exoskeletons, dehydrating and killing them.
If you're curious about its other uses, you can also learn how to use diatomaceous earth for parasite cleansing and why many homesteaders keep it on hand.
Lightly dust the top of soil and any areas of standing water (like saucers). Reapply after watering, as DE loses effectiveness when wet.
Neem Oil
Neem oil is an organic insecticide derived from the neem tree. It’s safe for humans and pets when used properly.
You can mix a few drops of neem oil into water (following label directions) and use it as a soil drench or foliar spray.
Neem works by disrupting the life cycle of insects. It won’t give instant results, but regular use can significantly reduce fungus gnat larvae in the soil and repel adult gnats.
Essential Oils

Some people use plant-based oils (such as citronella, peppermint, or lavender) to repel flying insects.
For instance, a few drops of peppermint oil on cotton balls placed around problem areas may deter gnats. However, use caution: pets and children can be sensitive to concentrated essential oils.
Biological Control
If you want a completely non-chemical fix for fungus gnats, consider beneficial nematodes or Bacillus thuringiensis israelensis (BTI). These are sold in garden stores (BTI is in mosquito dunk form).
They can be mixed with water and poured into plant soil or drains.
They target and kill gnat larvae but are harmless to pets and people. (However, these products may be overkill for a typical home infestation.)
Overall, the best natural strategy is persistence: trap the adults, remove breeding material, and maintain dry conditions.
All of these methods are pet- and child-friendly alternatives to chemical sprays.
How to Prevent Gnats From Coming Back
The most effective gnat control is prevention. Adopt these habits to keep flies out for good:
- Keep it Clean: Maintain good kitchen and bathroom hygiene. Wipe up spills immediately, store produce in the fridge or in sealed containers, and cover trash cans. Sanitation is key – remember, “ripe fruits and vegetables + sticky mess = fruit flies”. Make it a habit to wipe counters with vinegar or soapy water each day.
- Maintain Drains: Since drain flies and sometimes fruit flies breed in sink slime, clean your drains weekly. Pour boiling water down each drain, use a bent pipe brush to scrub away grime, or use a baking soda + vinegar flush. Keep sink and shower drains covered with screens to prevent flies from accessing stagnant water.
- Manage Houseplants: Don’t overwater indoor plants. Allow the top inch of soil to dry, and always use pots with drainage holes. Remove fallen leaves or debris from the soil surface. Optionally, put a layer of sand or gravel on top of soil to deter egg-laying. Inspect any new plant or bouquet before bringing it inside, as they can carry eggs.
- Take Out Trash Frequently: Empty kitchen garbage and compost bins regularly, especially in hot weather or if they contain food scraps. Clean the bins occasionally with soap and water to remove residue.
- Store Fruit Properly: Keep ripe fruit and vegetables in the refrigerator or sealed containers. Don’t leave salad greens or fruit baskets exposed on the counter. Even small amounts of exposed produce can sustain a fruit fly colony.
By combining cleanliness with smart plant care, you remove the conditions gnats need to breed. Prevention will help stop a new infestation before it starts.
A Simple Plan to Get Rid of Gnats for Good
- Identify the Culprit: Determine if you have fruit flies, fungus gnats, or drain flies (or a mix). Check kitchen counters, drains, and houseplant soil.
- Set Traps: Place vinegar + soap traps and/or DIY bottle traps in the worst areas (fruit bowl, near plants, by the sink). Replace them every few days to catch new flies.
- Clean Thoroughly: Remove all decaying fruit and clean trash/garbage areas. Wipe surfaces with vinegar or soap, and clean your drains and garbage disposal.
- Tend Plants Wisely: Let soil dry out between waterings and set out sticky traps in plant pots. If needed, repot any plant that stays too wet.
- Prevent Reinfestation: Adopt daily habits like taking out trash, covering food, and cleaning drains. The combination of trapping existing gnats and removing breeding grounds will break their life cycle.
Stay proactive. Within a week or two of using traps and cleaning up, you should see the gnat problem dwindle.
Keep up the prevention steps even after the insects are gone, and you’ll keep your home gnat-free.
Have you battled a gnat infestation? Share your results or any additional tips in the comments below!
Your experience can help fellow readers solve their gnat problems even faster.
Plan Your Garden With Confidence!

Ever start planting… and then realize halfway through that things feel a little scattered?
A simple plan changes everything.
When you sketch your layout first, you can see what fits, what flows, and what actually makes sense for your space. It saves time, money, and a whole lot of second-guessing later.
Our free Garden Planner helps you map out beds, organize plant spacing, rotate crops, and keep track of seasonal tasks – all in a clean, printable format you can actually use.
Whether you’re designing a low maintenance front yard or planning your full homestead garden, this gives you a clear starting point.
Less chaos. More clarity. A garden that works.
FAQs
Do gnats bite or carry diseases?
No – the common house gnats (fruit flies, fungus gnats, drain flies) do not bite people or pets. Fruit flies and fungus gnats are generally harmless to humans, though they are annoying.
They do not feed on blood or spread disease. (Fruit flies can contaminate food by carrying bacteria from one surface to another, which is why we recommend throwing out infested food and cleaning up spills.)
Drain flies do not bite either, but like fruit flies, they indicate unsanitary conditions. In short, gnats are mostly a nuisance pest rather than a health hazard.
Will gnats hurt my plants?
Fungus gnat larvae can damage plants if their numbers are high. In small numbers they mostly just feed on decaying matter, but a large population of larvae will chew on delicate roots and root hairs.
This can stunt the growth of seedlings and weaken young or stressed plants.
Established, healthy plants usually tolerate a few gnats, but watch for wilting or slow growth – those could indicate root damage.
If you suspect fungus gnats are harming a plant, follow the repotting and drying steps above to protect your plants. Adults (the flying gnats) do not bite or feed on the plants themselves.
How long will it take to get rid of all the gnats?
Gnats breed quickly, so you usually need persistence for a week or two.
In perfect conditions, fruit flies can go from egg to adult in about one week, and fungus gnats complete a cycle in roughly two weeks.
That means you may still see flies for a week after you remove sources. Keep traps set out continuously and repeat cleaning steps for at least 10–14 days.
You should notice the flying bugs sharply decline within a few days; complete elimination may take a couple of weeks of consistent effort.
Can I use hydrogen peroxide on my plants? Is it safe?
Yes, a diluted hydrogen peroxide solution is a common home remedy against fungus gnats, and it is safe for most houseplants when used properly.
Mix 1 part 3% hydrogen peroxide with 4 parts water, and water the plant with this mixture just as you would normal water.
You’ll see some bubbling as the peroxide oxidizes; this kills gnat larvae on contact. Use this treatment sparingly (maybe once a week) until larvae are gone.
It does not harm mature plants or roots in that low concentration, but avoid using full-strength peroxide or pouring it on leaves. As always, do a spot test if you’re unsure.
Why do gnats keep coming back?
Gnats will return if you haven’t eliminated their breeding sites. Commonly, something is still providing damp, organic material for them.
Check for the hidden sources: overwatered plant pots, sink or shower drains, trash cans, garbage disposals, mop buckets, or pet bowls with standing water.
Any lingering fruit juice or a forgotten compost can be a source. A few gnats might escape traps and lay eggs if you miss something.
Go through the steps again: keep plants dry, clean drains thoroughly, seal up or refrigerate food, and continue using traps for a few days.
Over time, by removing all breeding grounds, gnats will no longer have a reason to come back.