What Causes Gnats and How to Get Rid of Them

Updated on May 16, 2019
Sammendoran profile image

I had a gnat problem in my kitchen. Turns out my indoor plants and dirty drain were the culprit.

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).

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.

The following are causes of gnats inside your house:

  • Moisture: Moist breeding grounds for gnats include food spillage, moist potting soil, overwatered grass or plants, garbage cans, puddles in 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.

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).

Types of Common Household Gnats

Where 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
Simple guide to identifying common household gnats, determining what's drawing them into your home, and getting rid of them once and for all.

Best Ways to Get Rid of Gnats and Fruit Flies for Good

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

1. Eliminate the Source and Their Potential Breeding Ground

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 Larvae and Adults to Prevent Multiplying

To kill the larvae and stop the cycle of procreation, find their breeding ground.

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 and adult gnats that enter 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 5 minutes the next morning to clear everything out, and then repeat the process again that night. I did this for 6 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 2 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.

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 it 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.

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.


    0 of 8192 characters used
    Post Comment
    • Sammendoran profile imageAUTHOR

      Sam Mendoran 

      3 weeks ago from Morgan Hill, CA

      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.

    • profile image

      Barb Weil 

      3 weeks ago

      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

    • profile image

      Barb Weil 

      3 weeks ago

      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.

    • profile image

      John Weber 

      6 weeks ago

      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.

    • profile image


      7 weeks ago

      Vacuuming sounds like a great idea. Thank you.

    • profile image


      2 months ago

      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

    • profile image


      2 months ago

      Thanks! This is really helpful.


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, dengarden.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://dengarden.com/privacy-policy#gdpr

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
    ClickscoThis is a data management platform studying reader behavior (Privacy Policy)