Close all windows and doors and spray all areas of the house including the carpet, animal bedding, rugs etc. and go out for a few hours. Check for flies on your body before you enter the house as this is often the way they enter. Peppermint oil with citronella oil rubbed on your skin will provide some protection. Full strength eucalyptus oil or crushed mint also helps - check first for any skin irritation. Spiders and many birds, especially swallows, are predators of flies - encourage them.
Many birds eat insects so avoid using pesticides around the garden.
A mixture of glue and molasses on a piece of yellow board or cardboard placed around the house is a good alternative, as are flytraps. Besides, nuts go rancid if not used quickly. Any food in packets should be transferred to sealed containers. Make sure food storage areas are cleaned regularly and don't leave unsealed packets lying around. Garlic that has been chopped and slightly dried in the oven placed in a paper bag can help to keep moths at bay - don't use with moist food.