Fly traps catch flies by using their basic instincts against them. Their affinity to the stimulus of odor and light is what lures them into the trap. You need to mix some apple cider vinegar and some dish soap in a mason jar and then secure the jar with plastic wrap. Next, poke several holes into the plastic wrap with a toothpick or a knife and put the jar in your living room, bedroom, on the porch, etc. When the jar fills with dead flies, get rid of them, clean the jar, and then set the trap again.
Chop a rotten fruit into a bowl and cover the bowl with plastic wrap and then poke few holes into the plastic wrap. This trap won’t kill the flies, but it will still catch them and then you can dispose of them. You can put the whole bowl into soupy water for few minutes to kill the flies and then rinse the bowl and set the trap again.
DIY repellent spray
Mix dish soap and water and put the mixture into a sprayer and add few drops of some essential oils, for example, peppermint and lemongrass. Spray it all over the house every 2 weeks as a preventive method.
Apply few drops of lavender essential oil onto a sponge and then put the sponge into a jar and close the jar and leave it closed overnight. The next morning when you open the jar, the smell will come out in a concentrated form. Leave the lid slightly opened and place the jar in the garden, on the porch, in the bedroom, etc. When the smell fades away, put more lavender oil.
Cloves and lemons
Cut one fresh lemon into halves and then put several cloves into the lemon’s pulp and place the lemon on the porch, in the living room or bedroom, etc. The flies will stay away as they cannot stand the odor of garlic and lemon.