Choose from either chemical sprays, household cleaners, or hairspray. Chemical sprays kill flies instantly upon contact, though they contain harsh chemicals. You can also spray the flies with household cleaners, like Windex or Formula 409, or with an aerosol like hairspray. All of these sprays will help you kill a fly.