We may be compensated if you purchase through links on our website. Our Reviews Team is committed to delivering honest, objective, and independent reviews on home products and services.More

How To Get Rid of Gnats

Get a quote from exterminators near you

Join more than 6,755 people who have received a free, no-obligation quote in the last 30 days

Invalid Zip Code
Enter details in under 3 minutes

Join more than 6,755 people who have received a free, no-obligation quote in the last 30 days

Author Image Written by Brenda Woods Updated 05/09/2024

Most gnats don’t bite, sting, or spread disease, but they’re still a nuisance, particularly indoors. These annoying insects are attracted to sweet smells, body heat, sweat, and any form of moisture. Additionally, they can eat and lay eggs in nearly any decaying organic matter, so they can be hard to eliminate.

Here, we’ll show you how to identify the type of gnats you’re dealing with and provide some strategies for exterminating them and preventing them from returning. We’ll also give our recommendations for the top pest control companies in case DIY methods prove insufficient.

What Are Gnats?

“Gnats” is not actually a scientific classification. Instead, it’s a loose term for a number of different species of very small, flying insects. These flies lay their eggs in damp organic environments such as potting soil, pipe drains, or rotting produce. The reproduction cycle of fungus gnats, for example, only takes about 17 days, so one gnat can breed hundreds very quickly. They tend to swarm around food and moisture sources, drains, houseplants, and even your body.

While different types of gnats have different features, they do have some things in common: 

  • Small body—usually 1/4 inch or smaller in length 
  • Generally dark-colored 
  • Single pair of wings
  • Group flying behavior, often in swarms hovering at eye level 

Steps to follow

7 Ways To Get Rid of Gnats

Fortunately, minor to moderate gnat infestations can often be exterminated with simple DIY methods and thorough cleaning. However, if you have a severe gnat infestation, it may take more than one of these methods to eradicate the pests.

For fruit flies, the easiest DIY option is a vinegar trap, which is simple and cost-effective to create. Place a few tablespoons of apple cider vinegar or white vinegar, a few drops of dish soap, and a tablespoon of sugar in a bowl and stir. If you don’t have vinegar, you can substitute red wine.

Set your bowl in an area where gnats are prevalent, such as your kitchen or bathroom. The sugar and vinegar combination will attract gnats, and the dish soap breaks the surface tension on the liquid. When the gnats land to drink, the liquid traps and drowns them. For larger infestations, you may want to set out a few bowls of this mixture around the house. You can also cover the bowl with plastic wrap and poke a few holes in it, forcing any curious gnats to stay near the liquid.

Finally, a fruit trap can prove similarly effective. Cover a jar of overripe fruit with plastic wrap and poke small holes into the wrap’s surface. The gnats will smell a food source and enter the jar, becoming trapped. Of course, this won’t kill the gnats, so you’ll need to cover and throw away the jar after a few days.

If the gnats are infesting your houseplants, you can either purchase a mild insecticidal spray or make one yourself.

Fill an empty spray bottle with lukewarm water and mix in a few drops of mild dish soap. Spritz this lightly on gnat-infested plants, but be sure to come back two to three hours later to rinse the leaves thoroughly. Otherwise, you could damage the plant. Note that commercially available sprays designed for houseplants are less likely to damage the plants than homemade sprays.

Mix 1/2 cup of bleach in a gallon of water and pour it slowly down the drain to kill drain flies and their eggs nesting in pipes. Make sure there’s proper ventilation in the room when you do this and for an hour afterward. Also, scrub infested drain pipes with a wire brush and enzymatic cleanser for best results.

If the gnats don’t appear to be attracted to fruit or vinegar, you can also make a trap out of a candle. Place the lit candle in a dish of soapy water to attract the gnats and turn out the overhead light. They may burn up in the flame or drop into the water and drown. Although this method works best at night, never leave a burning candle unattended, especially while you sleep.

Glue or sticky traps are strips of paper or tape with an adhesive coating that traps gnats. You can set these traps anywhere in your home where there is gnat activity. Note that the traps will need to be replaced often and may have limited effectiveness for large infestations.

For outdoor infestations, you can purchase an electric insect killer or bug zapper to install on your porch or patio. These products kill gnats with an electric charge when they fly into the device. Bug zappers are an excellent way to deter biting gnats in your yard but will not fully eliminate their population, only reduce it. Also, you shouldn’t install a product that’s meant to be used outdoors inside your home.

Remember that traps and zappers only kill adult gnats, not eggs and larvae. Thus, if you have a lingering gnat infestation, a professional pest control company can help address it. Licensed professionals have access to better equipment, insecticides, and training, so they’ll be able to spot the source of the infestation and treat it efficiently. The best companies have expertise in ridding your home of eggs, larvae, and adult gnats. Their technicians will create a customized treatment plan for your home at a reasonable cost for pest control.

Types of Gnats

Fruit flies, drain flies, and fungus gnats tend to be the most common household pests. You can often tell which species you’re dealing with by where you find them and how they behave.

Fungus gnats thrive in damp conditions and feed on decaying plant matter and fungi. They often inhabit the soil of overwatered house plants. Fungus gnats do not bite, but their larvae can damage your plants, and the adult gnats can be a nuisance.
Drain flies earn their name from their attraction to standing water. If water and organic matter collect inside a drain, drain flies will feed on it and multiply quickly. You will most commonly see these gnats in bathrooms and near kitchen sinks. Drain flies do not bite.
drain fly on a white background
Fruit flies love to feed on fruits and vegetables and can quickly infest homes with easy food access. Other gnats prefer outdoor spaces, but fruit flies are notorious for multiplying indoors. Fruit flies do not bite.
These gnats live in areas with sandy soil and are especially common in coastal regions. Eye gnats do not bite, but fluid secretions in the eyes attract them, causing significant annoyance to humans.
Also known as buffalo gnats, black flies are small biting gnats that nest near small bodies of water. Some people have adverse reactions to black fly bites.

How Do Gnat Infestations Start?

Gnats commonly live outdoors, but they may enter your house through doors or cracks or holes in your foundation, walls, or windows. However, you can also inadvertently bring them in yourself if their eggs are on purchased products or new houseplants. These eggs are too small to see, making them difficult to avoid.

Once indoors, gnats often infest trash cans, rotten fruit, and other moist places where decomposing organic matter exists. They can also be found near sinks, drains, and toilets since they can reproduce in the grime inside pipes.

How To Prevent Gnat Infestations

Once you have treated your gnat infestation, the key to keeping it from coming back is to clean thoroughly and reduce available food and moisture sources for the gnats.

  1. Clean up food and drinks after meals: Don’t leave food or drinks sitting out, and clean up any spills shortly after they happen.
  2. Take out your trash every night and use a sealed trash can: Gnats are often attracted to items in the trash. By using a sealed kitchen trash can and emptying food waste frequently, gnats will be less likely to make their homes in your trash.
  3. Store fruit in your refrigerator: Because gnats are attracted to the smell of fruit, leaving it exposed on your counters can attract gnats. Storing fruit in the refrigerator can also keep it from ripening too quickly.
  4. Reduce humidity inside and outside your home: Repair plumbing leaks and sink drain stoppages as soon as possible. To prevent outdoor gnat problems, clean up any damp areas around rain gutters and birdbaths.
  5. Set up preventive yellow sticky traps: Place these near any trouble areas, such as near ripe fruit or houseplants, to keep an infestation at bay.
  6. Keep your drains clean: Perform regular drain maintenance with diluted bleach or a specialized cleaning solution to keep them free of grime and fungus. For a more eco-friendly drain cleaner that targets gnats, drain flies, and fruit flies, opt for a product like Natural Armor All-Natural Drain Fly Killer or Green Gobbler Fly Goodbye Drain Treatment.
  7. Don’t overwater plants: Indoor plants are often home to gnats, and overwatering them leads to damp potting soil that’s the perfect breeding ground for an infestation. Ensure your plants are in a pot with a drainage hole, and cut back on your watering schedule if you notice gnats buzzing around your houseplants.
Since they can carry gnats into the home, check any new plants thoroughly for gnats before bringing them into your household. Scientists at the University of Minnesota recommend checking the tops and undersides of leaves using a magnifying glass. Also, look at the rims and edges of pots and saucers. If you suspect the soil contains gnat eggs or larvae, repot the plant in fresh soil. Consider isolating new houseplants in a separate room for a week or so to ensure problems don’t develop and spread to your existing plants.

Our Conclusion

If DIY methods fail or if you want to skip right to a guaranteed solution, call a professional pest control provider to get rid of gnats. We’ve researched the top pest control companies in the industry and found that Terminix and Orkin provide the best service to homeowners across the country.

Both of these companies will implement a customized treatment plan for your home and educate you on ways to prevent a future infestation. We always recommend getting quotes from at least two companies to ensure you’re getting the best price on your service.

Compare Pest Control Companies





Get a free quote

Visit site

Visit site


Our overall score out of 100




Best for

Best Overall

Best for Urgent Service

Best Mosquito Plan

Annual cost for general pest control




States available




BBB rating




Online chat




FAQ About Getting Rid of Gnats

What causes gnats in the house?

Gnats are attracted to sweet scents, moisture, garbage, houseplants, and other warm, moist environments like your bathroom or kitchen. Gnats also live and reproduce in sink drains and garbage disposals due to the food residue, water, and shelter that drains provide.

What are the signs of a gnat infestation?

Visible swarms of gnats are the most obvious signs, but you may also spot the following:

  • Houseplants wilting, losing leaves, and yellowing
  • Slow plant growth
  • Gnats flying up from your sink when you turn on the water
  • Colonies of gnats found in drains, birdbaths, or other damp areas

Why are there fruit flies in my bathroom?

Even if there’s no food present in your bathroom, flies and gnats may be attracted to this space because of its warmth and moisture buildup. Alternatively, these gnats may be drain flies that live in the sink or tub drains. To get rid of flies, try fly traps made with vinegar and dish soap, clean the drain with bleach, or call a professional pest control.

Our Rating Methodology

We back up our pest control recommendations with a detailed rating methodology that we use to objectively score each provider. We review pest control plans, navigate the provider website, speak with customer service representatives by phone and online chat (if available), request quotes, and analyze customer reviews for each provider. We then score the provider against our review standards for plans and services, reputation and customer responses, customer service offerings, workmanship guarantees, financing, and availability to arrive at a final score on a 5-point rating scale.

To share feedback or ask a question about this article, send a note to our Reviews Team at reviews@thisoldhousereviews.com.