Flies can spread at least 30 different diseases to people and animals. They lay their eggs on rotting meat and other rubbish/garbage and in warm weather multiply at a phenomenal rate. So if you are having problems with flies in areas of your home where you would rather them not to be then have a read of a few tips I have listed below that should help deter flies.
Flies are attracted to food and rubbish/garbage. So keep all food and rubbish tightly covered, clean your rubbish bins with disinfectant regularly especially in the summer months.
Do not keep piles of manure or rotting compost, rotting fruit or vegetables near your house as they attract flies.
Put up fly screens over windows or doors. Fly screens can be a fine mesh that allows air through but does not allow insects. You can also buy tape screens that hang over your door that you can sweep to one side as you walk through.
At night many flying insects are attracted by light. So if you leave your windows open at night and have your lights on then you are going to attract a multitude of unwanted visitors around your light bulbs. If you have to leave a light on and you window open then make a home made fly screen out of some very fine mesh or netting and tape it over the open window. The finer the fabric the better. The mesh will stop the insects in their tracks.
As a general rule flying insects do not like smoke. So light an incense stick or a candle to drive them away from an area. There special candles that contain citronella that also deter certain flies.
If you are trying to deter flies from congregating in a particular area then leave a dish out containing molasses and black pepper. It will deter the airborne menaces.
To stop wasps, hornets or bees in their tracks give them a spray with some hairspray. Please be careful where you are spraying hairspray though as it is not nice stuff to be spraying around. If you do hit a bee or other insect then do quickly put the creature out of it's misery as spraying it with hairspray is not killing it, it is merely disabling it.
There are also a few natural herbs that deter flies. Put sprigs of elder, lavender, mint, pennyroyal, rue or southern wood in vases, or hang them up to keep flies away. Rub the leaves frequently so that the smell is released.