Use cloves
There are many ways to trap and kill fruit flies. You can use tape or spray to trap flies, but it's not the best solution. Many users of aerosol cans fear that the chemical can affect food and health. So stick 20-30 cloves on an apple. Then place the apple in the center of the table. You will be surprised by the results it brings. Why is this effective in repelling flies? It's simple: Cloves are one of the most effective fly repellents. When cloves are inserted into the apple, the juice from the apple releases the scent of cloves, which fruit flies hate.
In addition to repelling flies, the pleasant scent of cloves will spread throughout your home. You can also use cloves in another way to repel flies. Place a small bunch of cloves in a cotton bag, or use a tissue or cloth, wrap around the bunch of cloves and tie with an elastic or rubber band. Put cloves in canvas bags and hang them on the windows or corners of the house. The scent of cloves will prevent fruit flies from entering your home very well.