Yes, ammonia can be effective at killing flies. Ammonia is toxic to insects, including flies, and can be used as a method of pest control. However, it is important to use ammonia in a well-ventilated area and to follow all safety precautions when using this chemical.