To control any pest, you need to first identify it and why it is there, then take steps to eliminate it. To control fruit flies (sometimes called gnats), this means first finding the fruit or other organic matter that is attracting them.
Indoor Prevention of Fruit Flies
The only way to completely eliminate fruit flies is to inspect for and get rid of the source:
- Refrigerate produce or dispose of over-ripe or rotten items.
- Clean out drains, disposals, etc. to ensure the flies are not harboring or breeding there.
- Clean up any spills immediately―especially syrupy or sticky spills that will attract the flies
- Rinse recycle items, and keep in a covered container, preferably outside away from the home, if possible.
- Regularly empty garbage cans and keep the area clean.
- Inspect produce before bringing it into the house, especially if purchased at outdoor markets or if any items are over-ripe or beginning to rot.
- Always clean mops well and dry before storing; do not leave wet rags or sponges lying around.
Outdoor Fruit Fly Prevention
While all these are fairly basic sanitation practices, the problem comes in when you are able to check off all the above…but you still have fruit flies. Particularly when you realize that they are coming in from outdoors. When that is the case, there is an additional list of potential sources to inspect and clean:
- Fruit trees – If there are fruit trees in the area, check for and pick up fruit that has fallen and is beginning to rot.
- Drains – Any outdoor drains that are not regularly cleaned can attract flies and provide an ideal breeding area.
- Trash areas – Just as you need to do indoors, outdoor trash areas need to be kept clean and cans tightly lidded and regularly emptied.
- Fertilizer – Manure used to fertilize plants can be highly attracted to flies of many species.
- Dog feces – All types of flies are attracted to animal feces, so dog poop needs to be picked up regularly.
Get Rid of Fruit Flies
While none of the outdoor items seem particularly difficult, they can be virtually impossible to control if the fruit tree or fertilizer is in your neighbor’s yard, the trash area is a community site, or you live in an apartment or condominium with little or no control over the outside areas.
In our case, we believe the fruit flies were living and breeding in the areas and drains around the pond and the manure around the community trees.
So, our goal was to keep the outdoor fruit flies from coming indoors and get rid of those that had already gotten in.
Keeping Fruit Flies out
Fruit flies are so small they can easily fly through the mesh of many door screens. Because of this, the only way we found we were able to keep the flies from coming in was by keeping the main doors closed (not just the screen doors) during the heavy infestation periods. Since it was the same period of time that stink bugs were swarming our Southern-facing walls, keeping the door closed also helped keep those ugly bugs from working their way in!
Source: The Spruce