How to Get Fruit Flies Out of Plants

Have you noticed tiny flying insects around your plants? Depending on the type of plant, you could be battling a fruit fly or fungus gnat infestation. Fruit flies will typically go after sweet fruits, while fungus gnats will attack the plant itself as it feeds on the organic matter of plants. 

Ok, so how to get fruit flies out of plants?

In this article, we will refer to fruit flies and fungus gnats as gnats (all fruit flies are gnats). While they tend to feed on different materials, they can both attack your plants or fruit bushes. 

In this article, our focus is on getting rid of fruit flies and other gnats, so let’s do that by focusing on these three key areas:

  • Identifying an infestation
  • Tips to eradicate gnats from your plants
  • Prevention tips and DIY measures you can take

Identifying an Infestation

One or two gnats do not constitute an infestation. An infestation occurs when a swarm or “ghost cloud” of buzzing gnats invades a particular bush or plant while the larvae eat the plant’s roots.

So what do you do? Get rid of the plant? Turn to poisonous pesticides that have harmful effects? Both are options, of course.

But there are some more natural solutions that you can use to both eradicate and prevent gnat infestations in your garden or indoor potted plants. 

An infestation occurs when a swarm or “ghost cloud” of buzzing gnats invades a particular bush or plant while the larvae eat the plant’s roots. 

How to Get Fruit Flies Out of Plants

There are a great number of things you can do to get rid of gnats and their larvae.

From repotting pot plants to using pesticides, we have the best tried-and-trusted tips that you can use to remove these nasty pets and ensure the survival and health of your plants. 

1. Homemade Mixtures

Depending on the type of gnat you wish to eliminate, there are certain mixtures you can make at home using products you should have on hand.

A dish soap and water mixture in a spray bottle is great to keep on hand to spray your plants regularly. 

2. Pesticides

If your plants have a particularly nasty infestation, you might need to invest in a good natural pesticide that will help rid your plants of gnats and also prevent them from attacking your plants for good.

If you are treating your indoor plants, ensure that the pesticide is safe for indoor use. 

3. Potatoes

Thinly slice a potato and lay the slices on the top layer of soil in your pot. Cut enough slices to cover the soil completely.

The larvae in the soil of your plant will be attracted to the potato, which you can then throw away after a day or two. 

4. Sticky traps

This is a great solution to rid your plants of a gnat infestation. You can make your own homemade sticky trap using cardboard glued to an ice-cream stick and smothered in petroleum jelly. 

5. Fruit Fly Traps

Many people use vinegar and soap traps to trap fruit flies in the kitchen, but it will work anywhere. Fill a jar (not a bowl) with half dish soap and half vinegar, and cover it with a lid. Pierce some holes in the lid to enable the fruit flies to get in.

They will have a hard time getting out due to the soap.

6. Repotting your plants 

If the infestation is too severe and the soap and water mixture has not worked, you might need to repot your plant completely. To get started, remove the plant from the pot, ensuring that you do not damage the roots while removing all the soil from them.

Rinse the plant roots in a soapy water solution and disinfect your pot at the same time. 

Bag up the old soil and dispose of it in the trash. Add fresh, clean soil to your pot and pop your plant in. Don’t forget to water it. 

7. Smothering the soil

Gnats thrive on damp soil and fresh air. Eliminate one of these elements and say goodbye to gnats. Smothering the soil is an effective way to get rid of gnats, and you can use just about any gravel, coarse sand, or aquarium gravel to cover the top layer of soil in your pot.

This prevents the larvae from climbing out and will also stop the gnats from laying eggs in your pots. 

Prevention Tips and DIY Measures

Now that you’ve eradicated gnats from your plants, keeping them away should become a priority. We have two great DIY solutions you can make to keep your plants gnat-free and healthy.

1. Homemade Fertilizer

Taking care of your garden or indoor plants is easy if you know how. Making your own fertilizer is quick and easy, keeps your soil healthy, and will prevent gnats from making your pot plants their home. 

Taking care of your garden or indoor plants is easy if you know how.

Here’s what you will need:

  • A large watering can or bucket
  • Two tablespoons of molasses syrup
  • One tablespoon of Epsom salts
  • Two gallons of water

Mix the molasses, Epsom salts, and water together well in your watering can or bucket. Mix until the syrup and salts have both dissolved. Pour the mixture over the soil in your pots, then water thoroughly with clean water. Let the water soak in, and you are done!

2. An All-Natural Spray

You can make your own natural solution or “pesticide” with ingredients that most people have in their pantries.

You will need:

  • A spray bottle
  • Water
  • Dish soap
  • Apple cider vinegar or balsamic vinegar

Mix water and vinegar together in a spray bottle (in equal parts,) and then add a tablespoon of dish soap. Spray on plants regularly to keep gnats and other bugs away from your plants. 

Preventing gnats and fruit flies is easy. And by using one of our DIY recipes we have laid out above, you, too, can create the best natural pesticides and fertilizers to keep these little pests away permanently. 


Gnat infestations are common, especially during the warmer months when all the creepy crawlies come out to play. But, a gnat infestation can wreak havoc on your plants and should be taken care of as quickly as possible. 

In this article, we gave you the best tips and solutions for eradicating gnats, fruit flies, fungus gnats, etc., as well as the recipes for two tried-and-tested DIY solutions that will prevent gnats from infesting your plants.

Happy gardening!