How to get rid of gnats – 9 simple but effective entomologist-approved methods
Reduce moisture, use traps and seal up entry points, pest pros urge


If you're searching for information on how to get rid of gnats, it's likely these pesky insects have been flitting around and annoying you for a while, or seemingly appeared out of nowhere.
While 'gnat' is the blanket term often used to describe these small, annoying flies that infest drains and rooms, they are, importantly, not all the same or in your home for the same reason. Understanding their sub-type and exactly why they've set up home where they have will help you effectively get rid of any gnat infestations and keep them gone for good.
Here, pest control experts and entomologists reveal nine methods to deal with these common indoor pests, so you can banish the pesky bugs from your home.
How to get rid of gnats like a pro
Identifying gnat types
First, take a look at the gnats so you know what you’re dealing with, advises Damian Marcelo, certified entomologist at Fox Pest Control. ‘Fruit flies are approximately one-eighth of an inch long and are tan to brown in color,' he explains. ‘They will have either red or black eyes and will rest in areas with little to no airflow. When they are at rest they will quickly fly away when disturbed.
‘Fungus gnats are smaller than fruit flies and about one-sixteenth of an inch long and are a gray to black color. They will typically be found around live house plants and areas with little to no airflow. They don’t sit still long, and when swatted, will just about disappear from the force.
‘Drain flies, also known as moth flies, are approximately one-eighth of an inch long and are a gray color. When they are at rest, their wings will be situated in a heart-shaped pattern. If they are crushed, there will be a powdery residue left behind.
‘Red-eyed fruit flies typically will seek out over-ripe fruits and vegetables to feed and lay their eggs in, black-eyed fruit flies will feed/lay eggs on fruits and vegetables as well, but will also seek out other forms of decaying organic matter. Fungus gnat adults will feed on flower nectar, and as the name implies larvae feed on fungi found in soil and on plant roots. Drain flies feed on decomposing organic matter and sewage.’
Once you've identified the type, you can pick the most suitable and convenient way to get rid of gnats for good. Here's nine from our pros.
1. Deep clean drains and reduce humidity
Reducing moisture sources and banishing odors from your drains will deter gnats.
Gnats love moisture, so they will often be found hovering around your drains, both in the kitchen and the bathroom. Cleaning kitchen sink drains and cleaning bathtub drains to get rid of drain flies regularly is an easy fix.
To help get rid of gnats, Jim McHale, CEO and president of JP McHale Pest Management suggests, ‘Using enzyme-based cleaners to break down organic matter in the drains that will attract future flies. Importantly, never pour bleach directly down your drain if you think you have drain flies.'
He adds, ‘Repair any leaking pipes and make sure there is no standing water in food prep stations. Standing water creates an ideal breeding ground for drain flies. You can install fine mesh screens over drains to prevent adult flies from entering and laying eggs.' We recommend the number one top rated LASSHSWA Kitchen Sink Strainer available at Amazon for this.
An easy way to determine if the sink drain is a problem source is to set up a petroleum trap. Simply smother the inside of a small plastic cup with petroleum jelly, such as the Vaseline 100% Pure Petroleum Jelly available at Walmart, and put it upside down over the drain, so the drain is completely covered. Any gnats and flies that try to escape your cleaning solution will instantly be trapped and stuck in the jelly, preventing them from making a home anywhere else in your home.
You can also try using a commercial drain cleaner, such as Liquid Plumr, available at Walmart, to help dissolve grease and built-up food waste, and get rid of any nasty odors drawing gnats in. Alternatively, for a quick green cleaning approach, try cleaning with white vinegar. Pour half a cup of baking soda into the drain and follow up with one cup of white vinegar. Place a damp cloth, such as the Great Value Multipurpose Microfiber Household Cleaning Cloth available at Walmart, over the plughole to ensure the reaction travels down into the pipes rather than overflowing into the sink.
Additionally, another effective way to get rid of sources of moisture and reduce your home's humidity is by investing in the best dehumidifier you can afford.
2. Keep food covered and counters clean
Keeping surfaces clean is crucial when it comes to getting rid of gnats.
If you're dealing with a significant gnat problem, there will usually be something drawing them in. If it is not your drains, then it is likely bad food or dirt.
Pest control expert Jim, reminds us, ‘Fruit flies breed in fermenting organic debris. Clean up any spills or remnants of sucrose immediately and remember to change interior garbage bags frequently, especially during the summer months.' Use strong and durable bags to prevent odors from escaping, such as the Hefty Strong 30 Gallon Trash Bags available at Amazon.
When getting rid of fruit flies, it is also a good idea to wash dishes or put them in the dishwasher promptly, close the door straight after use, and keep leftovers covered. Store fruit correctly and throw out or use any overripe pieces as soon as you spot them. The popular Prep Naturals 26 pcs Glass Food Storage Containers available at Walmart will also stop flies from infiltrating your home. Don't forget to cover your trash, either, as hiding a trash can in a kitchen does more than boost your room's aesthetics. It also helps prevent pests such as gnats from infiltrating your trash bin and bothering your home.
Using a trash can with a secure lid to help mask trash can smells will work, but keeping your trash can inside a cabinet or drawer built into your kitchen is even more effective.
Additionally, Emma Grace Crumbley, entomologist at Mosquito Squad adds that it's not just old or rotting fruit that gnats are attracted to – it's any fruity scent, including your body wash, perfume and even your shampoo. 'To combat this, use unscented soaps,' she advises, such as the Dove Original Deep Moisturizing Beauty Bar Soap available at Walmart.
3. Use sticky traps
Sticky traps are an easy and fuss-free way to trap and get rid of gnats for good.
If you have dealt with whatever is drawing gnats into your home, but there are still some remaining offenders buzzing around, sticky traps can be the perfect solution. Gnats are attracted to bright colors, meaning yellow sticky squares are perfect for drawing them in and trapping them.
In particular, use sticky traps, such as the Zevo Flying Insect Indoor Fly Trap available at Walmart, around areas of high activity, such as your houseplants and drains, to eradicate any lingering pests.
Punteha van Terheyden, Head of Solved, spotted a few gnats in her small home office after bringing a new plant home. She says, 'I used the sticky fly traps in all my plant pots and this caught the few offenders that had snuck their way into my home on the new addition. This stopped a gnat infestation in its tracks.'
4. Make a vinegar trap
Vinegar traps are an all-natural and effective way to deal with gnats.
The simplest way to get rid of gnats with white vinegar is to make a DIY gnat trap to lure and trap them, begins Tom Dobrinska, a board-certified entomologist with Elrich Pest Control.
He says, 'Vinegar traps can be made by placing a small amount of apple cider vinegar [available at Walmart] in a clear bowl or jar. Cover the top tightly with plastic wrap and poke several holes in the top, which will allow the adult gnats to enter but will not allow them out.' We recommend the Glad Press'N Seal Plastic Food Wrap available at Amazon for this, as it features Griptex technology for a secure fit.
'There are also commercially available vinegar traps,' adds Tom, such as the Aunt Fannie's FlyPunch Fruit Fly Trap available at Amazon. 'These will help eliminate the fruit flies one at a time.'
5. Try a candle trap
Like most flying insects, gnats are attracted to bright lights and colors.
As gnats are attracted to bright colors and lights, you can also use a candle to draw them in and trap them. 'One of my favorite tricks is to set a candle in a dish of water and dish soap, then light the candle an hour or so before bed time,' says Dan Bailey, president of WikiLawn Austin Lawn Care. 'This should attract most of the gnats in the room to the light to drown in the water, ensuring your space is gnat-free.'
To make a candle trap, place a tall candle, such as the Stonebriar Collection Unscented White Pillar Candle available at Walmart, in a holder in a dish full of water. Then, light the candle and turn off all the other lights. Gnats will be attracted to the flame and be burned, or dazed enough to fall into the water below.
Remember to never leave lit candles unattended and always blow the flame out when leaving the room. You can also use citronella in your home to repel gnats, mosquitoes and other pesky insects.
6. Try dissuading scents
A quick spritz of an essential oil can help to deter gnats from entering your home.
Scott Williams, pest control expert and owner or Private Exterminator NYC, says, ‘For indoor spaces, I've found that a combination of UV light traps and essential oil diffusers (think citronella, lemongrass, or eucalyptus) can be highly effective. These methods are eco-friendly and safe for use around children and pets.’
Peppermint oil is also a great natural pest control option, especially when made into a bug spray with water and a few drops of liquid dish soap, such as the Dawn Ultra Liquid Dish Soap available at Walmart. From using peppermint oil to get rid of mice to getting rid of cockroaches, peppermint has the wonderful ability to deter pests from entering your home and bothering you in the first place.
To use peppermint oil, such as the Majestic Pure Peppermint Essential Oil available at Walmart, to get rid of gnats, spray the essential oil around your garden, windows, and doors, frequently reapplying when necessary, to deter pests from approaching your property. This method is best paired with other preventative measures or removal methods to ensure your gnat problem is properly taken care of.
7. Avoid overwatering plants
The moist soil of your houseplants unfortunately makes for an ideal breeding ground for gnats.
If dealing with an infestation, you may have noticed your houseplants becoming a hotspot for gnats, and it's no surprise. The moist soil offers an ideal breeding ground for fungus gnats, which can, in turn, make it particularly difficult to get rid of gnats in plants. To do so, you'll need to allow soil to dry out completely between watering your plants, to create a less hospitable home for them.
Scot Hodges, vice president of professional development and technical services at Arrow Exterminators, explains, 'Fungus gnats are more associated with house plants,' as they love damp soil and normally feed on decaying organic material. Therefore, taking away this damp soil, and using a moisture level indicator such as the XLUX Soil Moisture Meter available at Amazon, is often an effective enough way to get rid of fungus gnats. Using cinnamon in soil is also said to get rid of gnats in the house.
If the flies are already well-established, you might need to kill off the larvae with biological control, using nematode worms, which seek and destroy the maggots and are safe to use around both humans and pets.
Helpfully, entomologist Emma adds, 'There is a long list of plants that you can have around your home that will deter gnats, such as geraniums, lemon thyme, lavender, and Mexican marigold.'
8. Seal up entry points
'Caulk is your best friend.'
'Caulk is your best friend if you need to seal entry points throughout your home,' advises entomologist Emma. 'It's inexpensive and can be used around window frames, air intakes and exhaust grills. Additionally, use caulk to patch small cracks,' which are key entry points for gnats.
We recommend the GE Advanced Silicone Caulk available at Amazon for this.
9. Call in the professionals
Knowing when to call in the professionals can get to the root of the problem quickly.
Finally, sometimes, despite your best efforts, you'll notice signs it's time to call pest control.
'As always, if infestation gets to the point where these basic remedies won’t work, it's time to call a professional to get to the root of the problem and clear your home of these unwanted pests,' advises entomologist Emma.
Gnat banishing essentials
All prices were correct at the time of publication.
This natural insecticide is safe for use around kids and pets, when used as directed, without any added dyes, fragrances, or harsh chemical odors.
Mix up cleaning and pest prevention solutions in these eco-friendly and reusable glass spray bottles, which feature UV-protection to prevent ingredients degrading.
This fly ribbon is suitable for both indoor and outdoor use, and catches over 100 flies per ribbon with no insecticide and no aroma.
This waterproof all-purpose sealant is ready for water exposure in as little as 30 minutes, and is mold and mildew resistant, and won't yellow, shrink or crack over time.
Once you have dealt with the source of the moisture problem, use a dehumidifier to dry the air and prevent gnats from coming back or lingering.
Using a set of essential oils allows you to experiment with different scents and see what works most effectively when it comes to banishing gnats in your space.
FAQs
Why do gnats multiply so quickly?
The reason why a home can be quickly infested is the speed with which gnats breed. ‘Flies reproduce quickly, so once one or two are observed, the time from laying the eggs to adult can happen in a few days, and numbers will continue to increase while breeding sites and food sources exist,’ explains Scot Hodges from Arrow Exterminators.
Where do gnats lay eggs?
Gnats typically lay eggs in food sources, for the larvae to feed on once hatched, advises Scot. ‘Eliminating that food source and breeding site is usually the quickest way to eliminate them.’
Damian Marcelo adds, 'A female fruit fly will lay over 500 eggs in her lifetime, and those eggs will hatch approximately 24 hours later.'
Meet our experts

Scot Hodges has more than 24 years experience in the Pest Control Industry serving in various operational capacities including sales, service, and management, and currently serves as the director of professional development within Arrow Exterminators’ Arrow University. He earned his Associate Certified Entomologist (ACE) through the Entomological Society of America.

JP McHale Pest Management has provided science-based solutions to pest problems in the New York City area since 1971, and is featured in The Spruce, Real Simple, Forbes Home and more.

Emma has been an entomologist at Mosquito Squad for over three years, with a background as an insect zookeeper and lepidopterist (a person who collects or studies moths and butterflies).
One of the biggest pest control mistakes you can make when dealing with irritants such as gnats is leaving the problem to worsen. It is highly unlikely that gnats will ever go away on their own if they find somewhere to live. You should act to get rid of gnats as soon as you spot one or two lingering around your home to avoid them multiplying rapidly. Check for entry points and trap and kill any offenders in your home before it becomes an infestation.
Sign up to the Homes & Gardens newsletter
Design expertise in your inbox – from inspiring decorating ideas and beautiful celebrity homes to practical gardening advice and shopping round-ups.

Ottilie joined Homes & Gardens last year, after finishing a Master's in Magazine Journalism at City, University of London. With previous contributions in Livingetc and Motorsport Magazine, she produces content for the Solved section on the website, focusing on clever tips and tricks to keep your home beautiful, organized and clean. She also has a Master's degree in English Literature and History of Art from the University of Edinburgh, where she developed a love for inspiring interiors and architecture.
- Chiana DicksonContent Editor
- Punteha van TerheydenHead of Solved
You must confirm your public display name before commenting
Please logout and then login again, you will then be prompted to enter your display name.
-
Linda Evangelista's former NYC penthouse just made the classic black and white palette so much cooler – it's currently on the market for $8 million
Linda Evangelista's former home in Chelsea spans 4,022 square feet, with high ceilings and modern details that epitomize luxury living
By Hannah Ziegler
-
I tried the 50% decluttering rule, and it gave me the ruthless push to clear the clutter in my cramped kitchen cabinets
I can now find my dinnerware much more easily
By Rebecca Shepherd
-
I'm a board-certified entomologist and this is the one rodent infestation control mistake I urge you to avoid at all costs – you'll regret it deeply
Don't put your health or home at risk
By Daniel Baldwin
-
5 non-toxic mothball swaps that work – ditch chemicals and that horrible odor with these simple but effective alternatives
They'll protect your clothing and closets from moths without harsh chemicals
By Chiana Dickson
-
5 non-toxic pest control essentials proven to prevent pests humanely – and why avoiding harsh chemicals is a must to keep your family healthy
Natural pest repellents are more affordable, too
By Chiana Dickson
-
6 ways to prevent mold and damp in bedrooms – expert solutions to maintain a safe sleep environment
Don't sleep on these six tips, experts urge
By Seraphina Di Mizzurati
-
6 hidden places pests love to harbor their young – pest control experts reveal how to stop colony growth in your home
You can stop pests breeding in your home
By Andy van Terheyden
-
How to keep stink bugs out of the house – according to entomologists
Seal gaps, reduce plants, and use deterrents, pest experts recommend
By Ottilie Blackhall
-
How to get rid of pill bugs inside your house and banish them for good
Though harmless, you won't want a pill bug infestation inside, entomologists warn
By Ottilie Blackhall
-
How to get rid of mice in the attic – banish these pesky invaders for good with these top tips from pest control pros
From what draws them in to how to get them out – experts reveal everything you need to know about dealing with mice in the attic
By Andy van Terheyden