Skip to main content

What Causes Gnats and How to Get Rid of Them


What Are Gnats?

Gnats are small black or dark-brown insects with long, slender bodies (1/4-inch long) and thin wings. They look like tiny flies, but what you see are full-grown adult gnats. They belong to the Mycetophilidae, Anisopodidae, and Sciaridae families and are weak fliers. There are two types of gnats: non-biting and biting, but the ones you find in your house and yard are typically the non-biting type. The most common types of gnats people find in their homes are fungus gnats, fruit flies, or drain flies (phorid flies).

The gnats you commonly find in your home are likely fungus gnats, fruit flies, or drain flies (phorid flies).

The gnats you commonly find in your home are likely fungus gnats, fruit flies, or drain flies (phorid flies).

How to Get Rid of Gnats for Good

Use all three of these methods simultaneously to wipe out existing gnats and prevent further infestation.

1. Eliminate the Source

Clean up your kitchen, seal your drains, and replace your potting soil.

  • For fungus gnats: Fungus gnats live and breed in the soil of your potted indoor plants. Remove dead leaves on top of the soil. If you suspect mold or fungus, replace the pot liner, the soil, or both. If the root has rotted, consider replacing the plant altogether.
  • For fruit flies: Remove rotten or overripe fruit from the kitchen. Dispose of all organic foods outside. Tie the plastic bag tightly and properly close the trash bin to prevent gnats from getting attracted to the smell and breeding inside the trash can.
  • For phorid (drain) flies: If you see bugs in your kitchen that aren't fruit flies, they are likely phorid flies (or drain flies). These insects can only breed in moist areas, typically in drains or where there is leakage. Wipe down the outside of the pipes, fix any leaking pipes, fill and cover crevices and holes where moist dirt can get trapped, and keep your kitchen and bathroom dry.

2. Kill the Babies (Larvae) and the Adults to Prevent Multiplying

Search for their breeding ground in order to kill the larvae and stop the cycle of procreation.

  • For fungus gnats: The best method I've found is using a combination of steel wool and yellow sticky traps in my potted plants. I cover the top of the soil with coarse steel wool to shred emerging baby gnats flying out of the soil and adult gnats that fly into the soil to breed. I recommend getting medium coarseness or higher, and don't get the steel wool sponges because those have big holes that are easy for flies to get through. I also hang these Trapro Sticky Fly Traps on the plant to catch flying gnats loitering nearby. This combination ensures that I kill every single gnat possible.
  • For fruit flies: Fruit fly larvae live in fruits, so just dispose of infested fruits in your kitchen and refrigerator. Hang up those sticky fly traps to catch existing ones.
  • For phorid (drain) flies: Drain-fly larvae live in the sludge and film within your drain, but they may also breed inside the dirt that covers the outside of the pipes. Wipe down the outside with soap and water, and then do another wipe down with distilled white vinegar.

To kill the larvae inside the pipes, I used this Drain Treatment from Green Gobbler. I used the whole gallon over the course of a week, and my kitchen was completely clear of gnats after that. The product is a gel that traps flies and larvae and then kills them with the active ingredient, citronella. I would pour some down the drain at the end of the day and cover the drain with a glass bowl to prevent escapees. Then I would run hot water for five minutes the next morning to clear everything out, and then repeat the process again that night. I did this for six days.

3. Water Plants With a Hydrogen Peroxide Solution

To kill fungus gnat larvae on contact, water the plant with a mixture of 1 part hydrogen peroxide (3% solution) and 4 parts water. Once you pour the mixture into the soil, you should see some bubbling, which indicates that the solution is working.

4. Apple Cider Vinegar Gnat Trap

This is an efficient natural and homemade way to kill adult gnats without using harmful chemicals. The best part is that this works on all types of gnats.

How to Make a Gnat Trap:

  1. Pour apple cider vinegar and a bit of dish soap into a jar or cup and mix it thoroughly. The smell of apple cider vinegar attracts gnats like crazy and the soap prevents them from flying, thereby drowning them inside the cup.
  2. Cover the cup with plastic wrap and poke holes in it with a pen. The holes allow the gnats to crawl into the cup.
  3. Dump out the contents after two days, and start fresh. Do this repeatedly until you no longer see gnats inside the jar.

Note: You can also use beer, wine, or ripe fruit instead of apple cider vinegar, however, you may attract ants, so I recommend sticking to apple cider vinegar.

What Are Gnats Attracted to?

Gnats are attracted to moisture and organic material, which is why you'll notice more gnats during the summer than during the winter. They typically enter the house in search of food and a place to procreate. They gravitate towards decaying organic material, such as decaying leaves or rotten fruit and moist areas inside the home, such as wet potting soil or wet sinks and drains.

  • Moisture: Moist breeding grounds for gnats include food spillage, moist potting soil, overwatered grass or plants, garbage cans, puddles in the kitchen or outside your house, leaky pipes under the sink, and condensation around windows and vents.
  • Fruits and vegetables: Fruit flies appear when you leave produce out in the open, especially sweet-smelling fruits. They are also attracted to fallen or rotten fruits in your garden.
  • Decaying organic material: Fungus gnats love rotting plants and flowers. Things they feed on include fungus, mold, moss, and compost. They typically live in your potting soil where they can feed on either root rot or decaying leaves.
  • Humans: Perspiration, body heat, mucus from your nose, tears from your eyes, and carbon dioxide are all elements of attraction to the common household gnat. They also like sweet-smelling lotions, perfumes, hairsprays, and detergents, so avoid fruit fragrances if you have a gnat problem.
  • Light: Like flies, gnats can't fly very well in the dark, so they swarm around light fixtures and lamps.

How to Prevent Gnats From Coming Back

  • Don't overwater your plants. Let the soil dry out between waterings.
  • Remove dead material on top of the soil. Pick up and discard dead leaves, twigs, flowers, etc.
  • Don't leave food out. This means washing your dirty dishes and drinking glasses. Even a slight hint of juice, wine, or sauce will attract gnats.
  • Get rid of damp areas. Fix your leaking pipes and faucets. If there is condensation on the pipes, insulate them by getting a foam insulator.
  • Cover your trash cans. You should take the trash out as often as possible. Stinky trash cans are a haven not only for gnats but other creepy crawlies as well.

Types of Common Household Gnats

Simple guide to identifying common household gnats, determining what's drawing them into your home, and getting rid of them once and for all.

 AppearanceWhere Is It Found?What Is It Attracted To?How to Get Rid of Them

Fungus gnat

Small and black

Around potted indoor plants

Fungus and mold in potting liner and decaying leaves

Clean up dead leaves/flowers, and allow the soil to dry between waterings. Replace soil and pot liner if there is mold/fungus.

Fruit fly

Small and light brown with red eyes

In the kitchen

Ripe or rotten fruits and vegetables

Remove overripe fruits and vegetables in the kitchen; keep the compost lid shut tight

Phorid fly

Small; black, dull brown, or yellowish; walks in jerky zig-zag motion

Lives around drains, sewers, and garbage cans

Wet, moist, unsanitary areas

Fix any water leaks and keep the area clean & dry

This article is accurate and true to the best of the author’s knowledge. Content is for informational or entertainment purposes only and does not substitute for personal counsel or professional advice in business, financial, legal, or technical matters.


Barbara R on August 28, 2020:

Apple cider vinegar clears diaper rash in babies & clears all butts from painful viruses & upset stomachs! I wash all vegetables & fruits in A C vinegar even before CV-19! Soaking doesn’t hurt the fresh products, especially before u eat it! I think it can help save your life!

White vinegar cleans soap residue out of clothes! Also, stops the color from bleeding in new material! So wash new material in white vinegar Water to keep your fabric from running and messing up yr clothes! Also use white vinegar & water to clean cabinets counters & just everything! Run W V & water in a dirty coffee pot to get rid of the yuck! Have a good cup of coffee tomorrow! Also Apple cider vinegar mixed w water helps keep us, our pets, chickens & all animals, healthy!

Timothy Arends from Chicago Region on August 24, 2020:

I wonder if the Apple Cider Vinegar Gnat Trap will work on gnats or only fruit flies. I did have a fruit fly problem one time, and spraying a little bug spray on fruit rinds before throwing them away did the trick. i have a gnat problem now, and the same trick doesn't seem to work. Problem is, there are different species of gnats and a trick that works on one species may not work on another.

Deb on April 04, 2020:

We live in northern middle fl and gnats are so bad outside how do you get rid of them outside's so bad u can't even hardly walk to your car

Chris on February 01, 2020:

Visine kills them in the eyes, don't use it except externally, only eyes also" not up the nose!!!!! Flush nose with Nettie pot "" they make electric suction ones so it doesn't go everywhere like down your throat ☆☆it sucks but if you want to get them out of your nose and sinuses and actually kill their home... get used to the idea, its the only way, once you do it they will find their way to your eyes ""From the inside.. you'll feel them, Visine time!!! Now time to make a trap that works.. get a stool or something to wrap sticky fly paper around barber pole style,, 1 inch between wraps with a bowl of yeast sugar and water, on a plate after you watch it foam up the first time" don't end up with a volcanic eruption on your carpet, or anything that works like a rotten apple those work great but not for the ones that want YOU, they want blood " hence the carbon dioxide from the yeast like you breathe out, love all of you, good to know I'm not the only one, it's our chemistry, I wish I knew that fix, I'd become a millionaire, tnmoonshine

Kc on December 19, 2019:

Hi, a good friend just told me , to get rid of all house gnats go to Walmart , they carry - in the bug spray isle, these little

Red plastic apples they come 2in a Box and come with some type of oil or something

And you just pour the oil in the two little apples and sit them out where you have gnats and they are drawn to them, fly inside and can't get out.

She told me they work very well !!!

I have the same problem with these gnats eyes and nose, ears .need an solutions to this problem help me too on September 25, 2019:

I got the same problem with these gnats eyes and nose, ears pleased help

Juanita drake on September 23, 2019:

Where do i get greengobbler

AW on September 16, 2019:

I have a big issue as well.. I did not know they can come from the drain. I will be trying the remedy tonight.

The one thing I can say is them little suckers can get off those hanging sticky traps. I have watched them. Not strong fliers my ass. Even with residue from the sticky trap, the are on amission. They are so small they can walk around like nothing on it.

April Olichwier on August 21, 2019:

Hi! I live in the US, also. We have biting gnats! They bite my feet, toes, legs, arms, my back, my stomach, my neck, and anywhere else they have access to. The bite stings and really hurts! Afterward, the place they have bitten itches intensely! By the time I try to swat the area, they’ve moved on to another part. Research tells me they are also called “no-see ums”. They are black or grey and move so fast, you can’t see them! I have not been able to sleep at night now for about 2 months!!

They are driving me crazy, also! Good thing I don’t work, because if I did, I would probably lose my job, also.

From reading comments online, I put baking soda, white vinegar, and hot water down the kitchen and bathroom sinks last night. I’m going to try the green gobbler stuff tonight. I’m also taking the trash out every night. I might throw out the toaster, too. I don’t know what else to do, but pray!! I contacted my pastor and he is also praying. Got any other ideas?

Laurie Hayes on August 05, 2019:

I'm dealing with eye gnats. These are mostly found in 3rd world countries, my Dr. said. My Dr. also said there's no way I have these in the United States. Well I live in Florida and these eye gnats love the tropical weather. Iv'e had them since April and can not get rid of them. I'm beyond depressed, I lost a very good job, don't have any life outside my home, and not really sure I can go on. They have over run my life and I'm the nest. I'm 56 and never ever have I experienced something so devastating. I have yet found a Dr. who believes me, and yes I brought in the ones I caught by using tape on my face. They love my eyes, nose and around my mouth. They now are under my fingernails and toenails. They breed so fast I can't get a handle on them. Has anyone heard of these in the united states? If yes, Please let me know. Thanks so much. I'm wondering if I am high on my sugar intake and if I change my diet, will it help? I've done everything they say but it's for fruit gnats or fungus gnats. No info on eye gnats. Help... I'm losing my mind because all treatment is for the home, and there's no nest in my house, It's in my ears and nose.

G. D. on August 04, 2019:

I fought the fruit flies in the kitchen and finally figured out why I couldn't get rid of them in spite of having nothing around that would attract them. I noticed they were in one area which is where the toaster is. So I thoroughly cleaned the inside of the toaster (as much as one can clean the inside of a toaster!), Then I put the toaster in a plastic bag and voila I have only seen two of the fruit flies since then!

Sam Mendoran (author) from Morgan Hill, CA on June 24, 2019:

Gnats in the bathroom are likely coming from the drain. Or if you have plants in the bathroom or a trash can that doesn't get emptied frequently, that might be it. Clean your trash, remove any plants, and use the Green gobbler products down the drain.

Gnats around dog and cat food are fruit flies. Clean their dishes and water bowls after each day and the area around them, since they might make a mess around their bowls. And don't let their leftover food sit out for too long.

Barb Weil on June 23, 2019:

Hi again, I totally forgot to ask about the gnats that are in our cat & dog's food. What type are they & how best to get rid of them? Please help as I am going insane here! Thanks, Barb

Barb Weil on June 23, 2019:

What about gnats in the bathroom? I have seen them in the toilet & now I have to check all the time even when guests come over.

John Weber on June 06, 2019:

Fungus Gnats are attracted to yellow. Go to Walmart pick up pop cycle sticks (crafts), yellow post its, glue stick, Vaseline. On pop cycle stick put the sticky part of the post it (top of pop cycle stick half way up post it) fold in half and glue other end of post it to other side of pop cycle stick, cover the yellow with Vaseline and stick one in each plant. The gnats will get stuck and die. This only works for indoors.

Laurie on May 28, 2019:

Vacuuming sounds like a great idea. Thank you.

Snow on May 19, 2019:

We had bunch of fruit flies in kitchen. Just finished vacuuming them all up into oblivion. lol Cleaned up the whole kitchen, put bananas away, took trash out & put all recyclable drink cans in a bag & put outside.

Vacuum them. lol

Worked perfect for us

Michele on May 09, 2019:

Thanks! This is really helpful.