The best way to repel flies is through simple, preventive measures. In order to best repel flies, limit access to your home as much as possible, keeping doors and windows closed. You may also choose to screen windows, doors, and vents. Keep garbage cans clean and securely closed. Keeping surfaces clean will make your home less appealing to flies. For best results, contact a pest control professional to discuss extermination options.