Herbs such as basil and bay leaves naturally repel flies because flies do not like their smell. Lavender and tansy help to keep flies away as well.
Planting basil near walkways that lead to home entryways and using basil while grilling foods can keep flies away. Bay leaves are another culinary herb which has a smell that flies do not like. Growing the herb outside can keep flies from finding their way into the house. Placing dried lavender around the house can also prevent flies from staying inside. In addition, tansy, an herb with cleansing properties, repels flies as well. Tansy looks like marigold, which makes it an attractive centerpiece.