Legend has it that eating garlic will keep flies and other insects away from you. While strong garlic breath may be effective at keeping other people and vampires away, no studies have ever shown eating garlic to be effective at repelling insects.
Garlic-based spray products are often effective at keeping flies and other insects at bay. Rather than consuming them yourself, garlic sprays are intended to be applied to plants or other areas from which you want to keep flies.
Crushed mint, bay leaves and eucalyptus work to keep flies away when hung around the house or yard. Pine Sol sprayed on the surfaces you want to protect has also been reported to repel flies.