First, identify the weaknesses of the infestation to eliminate it. They love light and smell, for example. You can use strong fragrances and essential oils to kill them.
Fly traps are available indoors and outdoors. Flying insects love apple cider vinegar traps and fermented apple juice traps. Another effective method to eliminate insects is spray repellent spray.
Lavender is well-known for its pleasant smell and ability to repel insects. The faint clove smell repels flies. Insects can be repelled by mixing lemon juice with some spices.