Skip to content

How to Get Rid of Gnats in Your House Fast (and Keep Them Away)

Gnats in your house? Find out which kind you have, trap the adults, and kill the eggs in plant soil and drains with simple, safe methods that really work.

By Agha Ali AbbasPublished 10 min read
Illustration of a potted plant with small gnats flying above it and a yellow sticky trap

To get rid of gnats in your house, you need to do two things. First, trap the adults you can see. Second, remove the place where they lay eggs. For most homes, that place is wet houseplant soil, a dirty drain, or ripe fruit.

If you only trap the adults, new gnats will keep hatching. If you only clean, the adults will keep laying eggs. Doing both at the same time is what finally breaks the cycle.

This guide will show you how to tell which kind of gnat you have, the best traps to use, and how to stop them from coming back.

First, figure out which gnat you have

"Gnat" is a word people use for many kinds of tiny flying bugs. The three most common ones inside homes are fungus gnats, fruit flies, and drain flies. Each one lives in a different place, so knowing which one you have helps you get rid of it faster.

Type What it looks like Where you see it Where it breeds
Fungus gnat Tiny, black, long legs, looks like a small mosquito Around houseplants and windows Wet potting soil
Fruit fly Tan body, red eyes, round shape In the kitchen, near fruit and trash Ripe fruit, spills, trash
Drain fly Fuzzy, gray, wings look like a tiny moth In the bathroom or on walls near sinks Slime inside drains

A quick tip: If the bugs fly up when you water your plants, they are almost always fungus gnats. If they hover over your fruit bowl, they are fruit flies. If they sit on the bathroom wall and look fuzzy, they are drain flies.

Why you suddenly have so many gnats

Gnats have a very short life cycle. A female fungus gnat can lay up to a few hundred eggs in moist soil. Those eggs can grow into flying adults in about 3 to 4 weeks. That is why a few gnats can turn into a cloud of them so quickly.

Gnats need three things to survive:

  • Moisture, like wet soil, damp drains, or standing water
  • Food, like fungus in soil, rotting food, or slime in pipes
  • A safe place to lay eggs

Take away the moisture and food, and the gnats have nowhere to breed.

How to get rid of fungus gnats in houseplants

Fungus gnats are the most common gnats in homes with plants. The adults are annoying, but the real problem is the larvae. These are tiny, clear worms that live in the top 1 to 2 inches of soil.

Step 1: Let the soil dry out

This is the most important step. Fungus gnat eggs and larvae need wet soil to live. Most houseplants are fine if the top 1 to 2 inches of soil dries out between waterings.

  1. Stop watering until the top 2 inches of soil feel dry. Push your finger into the soil to check.
  2. Empty any water sitting in the saucer under the pot.
  3. Make sure the pot has holes in the bottom so extra water can drain out.

Drying the soil alone can wipe out many of the larvae.

Step 2: Put out yellow sticky traps

Fungus gnats love the color yellow. Yellow sticky traps are small cards covered in glue. You can find them at garden stores or online.

  1. Stick one trap into the soil of each plant with gnats, or lay it flat on top of the soil.
  2. Replace the traps when they are covered in bugs.

Sticky traps catch the adults before they can lay more eggs. They also help you see if the problem is getting better.

Step 3: Water from the bottom

When you start watering again, try bottom watering. Put the pot in a bowl of water for about 15 to 20 minutes. The soil soaks up water from below, and the top stays drier. Gnats like to lay eggs on the wet top layer, so this makes the plant less attractive to them.

Step 4: Kill the larvae in the soil

If you still have gnats after a week or two, treat the soil to kill the larvae. Here are two common options.

  • Hydrogen peroxide mix: Mix 1 part regular 3% hydrogen peroxide with 4 parts water. Water the plant with this mix until it comes out the bottom. It fizzes when it touches the larvae. It is safe for most houseplants, but test it on one plant first.
  • BTI products: BTI is a natural bacteria that kills gnat and mosquito larvae but is safe for people, pets, and plants. You can find it in products sold as "mosquito bits" or "mosquito dunks." Soak them in the water you use for your plants, following the label.

Step 5: Cover or replace the top layer of soil

Adding a thin layer of sand or small gravel on top of the soil makes it hard for gnats to lay eggs. If the plant is badly infested, you can repot it in fresh, clean potting mix. Throw the old soil away in a sealed bag outside.

How to get rid of fruit flies in the kitchen

If your gnats are around fruit and trash, they are likely fruit flies. They breed in ripe fruit, spilled juice, and garbage. We have a full step-by-step guide on how to get rid of fruit flies for good, but here are the basics.

  1. Throw out overripe fruit and vegetables. Check the bottom of bags of potatoes and onions too.
  2. Put ripe fruit in the fridge.
  3. Take out the trash and wipe the inside of the can.
  4. Rinse bottles and cans before you recycle them.
  5. Set a vinegar trap (see below).

How to get rid of drain flies and gnats in the sink

If the bugs are near the sink, shower, or tub, they may be breeding in the drain. The slimy layer that builds up inside pipes is the perfect home for them.

How to test a drain: Put a piece of clear tape over the drain at night, sticky side down. Leave a small gap for air. If you find gnats stuck to it in the morning, that drain is the source.

How to clean the drain:

  1. Remove the drain cover or stopper.
  2. Pull out any hair and gunk you can reach.
  3. Scrub inside the drain with a stiff pipe brush and hot, soapy water.
  4. Pour in half a cup of baking soda, then one cup of white vinegar. Let it fizz for 15 to 30 minutes.
  5. Flush with very hot tap water.
  6. Repeat once a day for a week.

Do not mix bleach with vinegar or other cleaners. It can make a harmful gas. Also, bleach runs through the pipe too fast to clean the slime well, so scrubbing works better.

A dirty drain can also cause a bad smell. If your drain smells like sewage, read our guide on why a house can smell like a sewer for more fixes.

The best homemade gnat traps

Traps catch the adults while you clean up where they breed. Here are the traps that work best.

Apple cider vinegar trap

This is the most popular trap, and it works well for fruit flies and many gnats.

  1. Pour about half an inch of apple cider vinegar into a small bowl or jar.
  2. Add 2 or 3 drops of dish soap and stir gently.
  3. Cover the top with plastic wrap and poke a few small holes in it with a toothpick. (This step is optional, but it helps.)
  4. Place it near where you see the most gnats.
  5. Replace the liquid every 2 to 3 days.

The vinegar smell pulls the gnats in. The soap breaks the surface of the liquid, so they sink instead of flying away.

Fruit trap

Put a piece of very ripe banana or other fruit in a jar. Roll a sheet of paper into a cone and put it in the top of the jar, narrow end down. Gnats fly in through the small hole but have a hard time finding their way out.

Wine or beer trap

Leave a little bit of red wine or beer in the bottom of a bottle. The narrow neck makes it hard for gnats to escape. This works best for fruit flies.

Dish soap spray

For gnats you can see, mix water and a few drops of dish soap in a spray bottle. Spray the gnats directly. The soap coats them and they die quickly. Do not spray it directly on plant leaves too often, as it can harm some plants.

Yellow sticky traps

As mentioned above, these are the best trap for fungus gnats. Place them near plants and windows.

Gnats in your bedroom or bathroom with no food around

It can be confusing to find gnats in a room with no fruit or plants. Here is where to look:

  • Drains in the bathroom sink, shower, or tub
  • Houseplants in the room or a nearby room
  • Damp areas, like a wet towel, a leaky pipe under the sink, or a moldy window sill
  • Trash cans, even small ones with tissues or food wrappers
  • Window screens with holes, which let gnats in from outside
  • A pet's food or water bowl

Moisture is the key. If a room feels damp or smells stale, gnats may be breeding in hidden wet spots. Our guide on fixing a room that smells musty explains how to find and dry out damp areas.

How long does it take to get rid of gnats?

Most people see far fewer gnats within about a week of starting these steps. But it often takes 2 to 4 weeks to get rid of them all. That is because eggs that were laid before you started will keep hatching.

Stick with it:

  • Keep your traps out and replace them often.
  • Keep the soil dry and the drains clean.
  • Wait until you have seen no gnats for a full week before you stop.

How to keep gnats from coming back

Once the gnats are gone, these habits will help keep them away:

  • Do not overwater your plants. Let the top of the soil dry out first.
  • Empty plant saucers after watering.
  • Keep fruit in the fridge once it is ripe.
  • Take out the trash often, especially food scraps.
  • Rinse dishes instead of leaving them in the sink.
  • Clean your drains once a week with baking soda, vinegar, and hot water.
  • Dry sponges and dish rags, and replace them often.
  • Fix leaks under sinks and around tubs.
  • Repair holes in window screens.
  • Check new plants before you bring them inside.

A clean kitchen is much less inviting to gnats. If you want a simple weekly routine, our step-by-step house cleaning method is easy to follow and can include your kitchen and drains.

What not to do

Some common tips do more harm than good:

  • Do not use bug spray on houseplant soil unless the label says it is for that use. It can hurt the plant and is not needed.
  • Do not mix cleaning products, especially bleach with vinegar or ammonia.
  • Do not keep watering on a schedule if the soil is still wet. Check the soil first.
  • Do not rely on traps alone. They help, but they will not fix the problem without cleaning up where gnats breed.

When to call a pest control company

Most gnat problems can be solved at home. Consider calling a professional if:

  • You still have lots of gnats after 4 weeks of trying these steps
  • You cannot find where they are coming from
  • You think they are breeding inside a wall, under the floor, or in a hidden leak
  • The bugs bite, which means they may not be gnats at all

The bottom line

To get rid of gnats, you need to trap the adults and remove the place where they breed. For fungus gnats, let the plant soil dry out and use yellow sticky traps. For fruit flies, clear out old fruit and trash and set a vinegar trap. For drain flies, scrub the drain until the slime is gone. Keep at it for a few weeks, and your home will be gnat-free.

Frequently asked questions

What kills gnats instantly?

A spray bottle of water with a few drops of dish soap kills adult gnats on contact. A vinegar and dish soap trap also catches them fast. But these only kill the adults. To stop gnats for good, you also need to remove the place where they lay eggs, like wet plant soil, a dirty drain, or old fruit.

Why do I have gnats in my house when I have no plants or fruit?

Gnats can breed in drains, garbage cans, recycling bins, damp sponges, mops, and anywhere with standing water or mold. They can also come in through open windows or window screens with holes. Check your sink and shower drains first.

How long does it take to get rid of gnats?

Most people see a big drop in gnats within a week. It can take 2 to 4 weeks to get rid of them completely, because eggs that were already laid will keep hatching for a while. Keep your traps out until you see no gnats for a full week.

Do gnats bite?

The gnats you find inside homes, like fungus gnats, fruit flies, and drain flies, do not bite people. They are annoying, but they are not dangerous. Some outdoor gnats, such as biting midges, can bite.

Written by

Agha Ali Abbas

Agha Ali Abbas is the founder and editor of TimeToNote. He researches and writes practical guides to everyday problems, checking each fix against manufacturer documentation and reputable sources before publishing.

How we research and update our guides