A swarm of gnats inside your home is a major nuisance — but nothing compared to the $200 to $600 you may have to spend if the infestation gets so bad you need to call in a pest control expert.
Luckily, there’s an easy and effective way to stop these little winged creatures in their tracks and prevent them from returning. We spoke to a pest control expert for the best advice for killing all types of gnats.
What are gnats?
Gnats are tiny flying insects that are often found in shoals and are known for their ability to hover in place. The three most common types of gnats found in homes are mushroom gnats, fruit flies and drain flies. You first need to get up close and personal to identify which gnats you have in your home, to understand how to best solve the problem.
The good news is that while some species of gnats can bite and sting, the types most commonly found indoors are simply a nuisance to humans, flying in your face during meal preparation or during dinner parties. “In a recent study, we found that most of the ‘flying insects’ in the house were mold gnats,” says Dr. Changlu Wang, who works in the Department of Entomology at Rutgers University, adds that mushroom gnats “do not bite people or cause allergies. reaction.”
While gnats are unlikely to go away on their own, they can be managed with a little caution and some basic home remedies.
How to prevent mosquitoes
In general, gnats – along with many other pests – thrive in moist, damp environments, so you may want to consider using a dehumidifier in damp areas of your home. “In a damp basement, keep the relative humidity below 50% and make sure the bathroom is well-ventilated,” says Dan DiClerico, director of the Good Housekeeping Institute’s Home Improvement and Outdoor Lab. “Just keep in mind that a dehumidifier won’t cure the underlying moisture source.” You’ll also want to fix any leaky pipes and make sure your home’s gutters and drains are carrying water away from the foundation walls to keep moisture out.
Beyond that, the easiest way to prevent an infestation in your home is by eliminating the source of the insect “food,” which varies depending on the type of gnat:
✔️ Mushroom gnats usually found near ornamental plants. “Mushroom gnat infestations are often caused by moist soil sources, such as houseplants, or rotting or damaged plant roots,” says Dr. Jim Fredericks, a board-certified entomologist and senior vice president of public affairs at the National Pest Management Association (NPMA). To prevent mold gnats, it’s important to regularly repot your houseplants in new soil and reduce over-watering.
✔️ Fruit flies feast on rotting fruit and vegetables. To keep fruit flies at bay in your home, rinse and dry your produce as soon as you get it home from the store, then store it in the trash or in the fridge as much as possible. “By washing and storing it properly, fruit flies can no longer find that food source,” says Chelle Hartzer, an entomologist from Orkin. Fruits that ripen quickly — such as apples, grapes, melons, pairings, peaches, and plums — can be stored in low-moisture drawers on the shelves; perishable produce, including leafy greens, carrots, and broccoli, belong in a high-moisture shelf drawer. While bananas are best left out on the counter, ideally in a special banana hanger, you can transfer them to the fridge once they are ripe, or peel them and store them in the freezer in an airtight container.
✔️ Drain flies usually found in kitchen and bathroom drains, garbage dumps, and rarely used toilets, as they prefer bacteria, dirt, and grime. To prevent sewer flies, it’s important to clean and sanitize the drain frequently, especially during hot, humid summer weather.
- To clean drains, pour in a solution of equal parts baking soda and vinegar, wait five minutes, then follow with boiling water. Stubborn plugs may require more rigorous treatment; Hartzer recommends using a drain cleaner such as Drano Max Gel Clog Remover to clean the pipes. If the problem persists, a continued infestation could indicate a leak, so call a plumber.
- To clean the landfill, put a dozen ice cubes in the chamber, plus 1 tablespoon of baking soda, a few lemon wedges, and 1 teaspoon of bleach. Turn on the drain without running water until you hear the grinding sound stop. Then, with the motor running, rinse with cold water for 30 seconds.
How to get rid of fleas fast
While precautions will stop the gnats at their source, sometimes it’s better to take action right away. Here are the most effective ways to get rid of gnats, instantly.
1. Use a high-tech bug zapper.
We’ve found that plug-in traps can be very effective. Consider Zevo Flying Insect Traps, a GH Seal holder that uses safe amounts of blue and UV light to attract gnats, fruit flies and mosquitoes. “I personally love the Zevo traps that have earned our Seal; I have it in my house all year round,” says Birnur Aral, Ph. D., director of the Good Housekeeping Institute’s Health, Beauty and Sustainability Laboratory. “We recently tested an updated version of the product and found that it is much more effective at trapping gnats.”
2. Try a spray solution.
That Zevo Fly, Mosquito & Fruit Fly Insect Spray, another GH Seal holder, is also a good choice. It uses geraniol oil and citronella, which are bio-insecticides that don’t need to be registered with the EPA, to kill the gnats on contact. While safe around people and pets, sprays must be handled with care; Zevo warns against getting in eyes or skin, and flammable liquids should not be used near power lines.
3. Make a homemade vinegar trap.
One of the best and easiest methods is to set a vinegar trap. There are several ways to do this:
- Make a trap with apple cider vinegar and plastic wrap: DIY your own fruit fly trap by pouring a small amount of apple cider vinegar into a glass or simply removing the cap from the bottle. Cover the hole with plastic wrap and secure with a rubber band. Then, make some small holes in the plastic. Fruit flies will enter but not get out.
- Make a trap with a paper cone, vinegar and old fruit: Put some vinegar and a piece of very ripe fruit in a jar. Then, roll the printer paper into a cone and place it in the jar, placing the narrow opening on the bottom. The smell of rotting produce will help draw fruit flies into the mix, but the paper cones will make it difficult for them to get out.
- Leave out the bowl of vinegar and dish soap: Add three drops of dish soap to a bowl of vinegar, and leave it uncovered on the problem area. The soap cuts the surface tension of the vinegar, so flies attracted by the vinegar sink and drown.
4. Take out the beer or wine trap.
Besides vinegar, fruit flies also like the smell of wine. Leave an old, nearly empty bottle of wine – the spindly neck will trap flies. That The Old Farmer’s Almanac also recommends using stale beer to attract fruit flies.
5. Buy a sticky trap.
For fail-safe traps, buy one Aunt Fannie’s FlyPunch! on Amazon. The mixture includes sodium lauryl sulfate (a surfactant used in soaps) and malic acid (found in fruit). Just open the top, place it on your desk and watch the cycle of life unfold.
Looking for more advice on managing pests? Check out our guide to the best mouse traps and how to get rid of silverfish.

Contributing Author
Caroline is a writer and editor with nearly a decade of experience. From 2015 to 2019, he held various editorial positions at Good housekeeping, including as a health editor, covering nutrition, wellness, wellness, and other lifestyle news. He graduated from the Medill School of Journalism and dreamed of the day Northwestern would return to the Rose Bowl.

Amanda Garrity is a lifestyle writer and editor with over seven years experience, including five years on staff at Good housekeeping, where she covers all things home and the holidays, including the latest interior design trends, inspiring DIY ideas, and gift guides for any (and every) occasion. She also has a soft spot for fun TV shows, so you can catch her writing about popular shows like Virgin River, sweet Magnolias, Hallmark channel When Calling Heart and much more.