Your cat comes with love, purrs and soft fur; unfortunately, it also poops a lot, sometimes attracting hordes of flies. This will either prompt you to run around swinging at them with a fly swatter or newspaper, or encourage you to try more tactical approaches. Many ways of killing flies exist. Even Mother Nature supplied the Venus Fly Trap to help manage the fly population. You can devise your own series of traps and take other precautions to limit the number of annoying flies that enter your home to get a whiff of your cat's faeces.
Shut all the windows and doors in your home. Buy screened doors and window screens if the weather is too hot.
Clean your home of anything that the flies might be attracted to. In this case, you will have to keep your kitty litter box if you don't want your cat to poop on your floor, but move it to an area of the home that's the farthest away from an open window or door. This may cause the smell of the litter box to become overwhelming. You may need to clean the box more often if it isn't near an open door or window.
Kill the flies already in the house by using a bug spray or hitting them with a rolled magazine or newspaper. The flies might initially be attracted to your kitty litter box, but they may venture off into another smelly corner. Note that bug sprays are harmful to pets and people when inhaled. Make sure your cat and humans aren't around when you spray and protect your own health by avoiding inhaling the spray.
Hang sticky fly strips near problem areas, such as the litter box. Consider adding Venus Fly Traps -- plants that eat flies -- near the litter box, or even on top of it.
Place a nearly empty jar of jam with a bit of water in it near the litter box. You can also place it around another problem area to prevent the flies from getting to the box. Mix the water and jam together. Screw the lid on tightly. The liquid should equal approximately one-quarter of the jar's height. Puncture the jar lid with a screwdriver or other sturdy point until you have a hole big enough for a fly to crawl into. The fly will get trapped inside and drown.
Flies also are attracted to food. Canned pet food is a particular favourite.