Basil is a great source to deter Flies.
1. Plant a pot of Sweet Basil in a Sunny Area near a frequently used Entry Door.