Nothing’s more annoying than tiny flies buzzing around your house, especially when they seem to come out of nowhere. One minute everything is fine, and the next you notice little bugs hovering around your houseplants, kitchen sink, or fruit bowl.
The tricky part is figuring out whether you’re dealing with fungus gnats or fruit flies. They may look similar, but they’re attracted to different things, so getting rid of them takes a slightly different approach.
Fortunately, several methods can tackle both pests and keep them from coming back.
Use Quality Soil

To keep gnats away from your houseplants, start by using high-quality, well-draining soil. Contaminated or poor-quality soil is a common way gnats get into your indoor garden.
Allow the Soil to Dry

Allow the top layer of your plant’s soil to dry out between waterings. Gnats flourish in wet conditions, so letting the soil dry can prevent their larvae from thriving.
Layer the Soil with Sand or Gravel

Consider topping your soil with sand or gravel. This improves drainage and discourages gnats from laying eggs by creating a barrier they can’t easily penetrate.
Do Not Overwater
Be mindful of your watering habits. Overwatering is a welcome sign for gnats, creating an ideal breeding ground. Water your plants as needed.
If you’re unsure when to water, a simple touch test by inserting your finger into the soil can guide you. Also, ensure your pots have adequate drainage to prevent water from pooling.
Proper Pot Drainage
Poor drainage can contribute to gnat infestations, as water can accumulate at the bottom of the pot and create a moist environment for the insects. Choose pots that have drainage holes for optimal soil drainage.
Remove Dead Leaves

Keep the plant area tidy by promptly removing dead or decaying leaves. Gnats are drawn to decomposing organic matter, and a clean soil surface is less inviting.
Hydrogen Peroxide Solution
A hydrogen peroxide solution can safely and effectively target gnat larvae. Mix 1 part 3%
Essential Oil Spray
An essential oil spray can be an effective natural repellent. Mix water with a few drops of peppermint, eucalyptus, or tea tree oil, and spritz lightly on the soil and foliage.
Use Sticky Traps
Yellow sticky traps are great for catching adult gnats. Their attraction to the color means many will get trapped before they can lay more eggs. These sticky traps are the best.
Neem Oil

Applying neem oil to the soil acts as a natural insecticide, targeting gnat larvae without harming your plant.
Cinnamon

A sprinkle of cinnamon on the soil can serve dual purposes: it has antifungal properties that help prevent fungus gnats and adds a pleasant scent to your plant area.
Use Coffee Grounds
For coffee-loving houseplants, you can use coffee grounds to keep gnats at bay. When you’re repotting your houseplant, consider adding a modest amount of used coffee grounds to the potting soil.
The strong smell of coffee grounds repels gnats and other pests, making it a natural repellent.
Frequently Asked Questions About Gnats and Fruit Flies
Fungus Gnats vs. Fruit Flies: What’s the Difference?
Fungus gnats are small, dark insects with long legs that often hover around houseplants. Their larvae live in moist soil and feed primarily on fungi and decaying organic matter, though large populations can sometimes damage plant roots.
Fruit flies are usually tan or brown with rounded bodies and often have reddish eyes. You’re more likely to notice them around bananas, tomatoes, trash cans, recycling bins, or other places where food is starting to ferment.
What Kills Fungus Gnats Fast?
Yellow sticky traps can catch adult fungus gnats almost immediately, but they won’t eliminate larvae in the soil. For better control, combine sticky traps with reduced watering and a Bti product labeled for fungus gnats.
How Long Do Adult Gnats Live?
Adult fungus gnats generally live about a week, although their full life cycle can take roughly three to four weeks depending on temperature and growing conditions. That’s why new gnats may continue appearing even after you’ve caught the adults.
Can I Make a DIY Gnat Spray?
Homemade sprays made with dish soap, essential oils, or vinegar are frequently recommended online, but they can damage houseplants and may not control fungus gnat larvae in the soil. Sticky traps, appropriate soil treatments, and better watering practices are generally more dependable than spraying homemade mixtures onto your plants.















Thanks for sharing my house plants are suffering I will consider some of your justers.
Thank you for your suggestions to get rid of gnats. I am anxious to try them because the gnats are embarrassing and worrisome. Thanks again.
I feel your pain. Let us know how it works out.
Thanks for the suggestions for the gnats I just purchased the yellow sticky stick.
That’s great news.
Great source, and these suggestions work.