Flies have been part of The Sims series since the beginning.
In The Sims, flies appear over plates of spoiled food, and eventually appear over piles of trash, dead mice[TS:U], and pet droppings[TS:U]. In addition, "free range" flies often appear if the house or lot is messy—even unmade beds can cause them to appear. These flies are not harmful, but when they are in a room, they reduce its Room score.
If Unleashed is installed, dogs will sometimes jump and snap at "free range" files, but cannot get rid of them. "Free range" flies can be picked up and sold in Buy or Build mode if the move_objects on cheat is enabled. Oddly, they're labeled as the "SSRI Virtual Reality Set" and worth 460 simoleons.
The Sims 2Edit
In The Sims 2, flies will appear over plates of spoiled food, and will eventually appear over piles of trash, very dirty toilets, sims who have been at 0 hygiene for 1–3 days, and dirty pet bedding[TS2:P]. Babies and toddlers that have a sloppy personality will also have flies appear alongside green stink clouds by their butt whenever they have a dirty diaper. It does not seem as though "free range" flies exist in The Sims 2. However, having too many fly-bearing objects on a lot can result in "death by flies".
Death by fliesEdit
Being eaten alive by flies is a form of death in The Sims 2. The event can be triggered if there are many (10-15) dirty, fly infested objects emitting green whiff clouds in a room. If a Sim walks through this pest breeding ground, there is a chance that the flies will swarm them and eat them alive. This event is more likely to happen to Sims with low hygiene. How flies acquired the ability - or the incentive - to do this is not explained. The eaten Sim's ghost will be purple.
The Sims 3Edit
In The Sims 3, flies hover over food or dishes that has not been put away or washed in a few Sim days. However, flies do not kill Sims in this game, but can cause Dirty/Filthy/Vile Surroundings moodlet and can be a major annoyance to the player.
The Sims 4Edit
Flies in The Sims 4 are similar to the ones in The Sims 3. They hover over spoiled food and empty plates that haven't been put away or cleaned. As with The Sims 3, flies do not kill Sims in this game, but they can make them uncomfortable.