No official "delete Sim" cheat exists, but similar outcomes are possible with testing cheats.
boolProp testingCheatsEnabled true)kill [SimName]: Sim dies of old age instantly, leaves tombstone/urn.aging off: Stops aging; later use aging on to age rapidly to death.move_objects on: Delete Sim's house or move them off-lot to die from environment (fire, starvation).Caution: Save before using cheats/mods; use reliable sources (ModTheSims, SnootySims).
aging on instantly ages Sim to death.aging off lets you manually age them to Elder, then aging on.Best Prevention: Manage gameplay and use family planning options (birth control objects, adoption).