Instructions
Click on the dead Sim's remains. If the Sim died outside, his remains look like a gravestone, while the remains look like an urn if he died inside.
Select "Return to Netherworld" from the remains menu to send away any dead Sim who has become a playable ghost through the Science Lab resurrection chance event.
Select "Put Remains in Inventory" from the remains menu to get rid of nonplayable ghosts from your house.
Travel to a different lot with the remains in your Sim's inventory. Each town has a cemetery where remains can be taken, or you can take the remains to another public lot or a different Sim's home.
Enter the "Edit Town" menu and place the gravestone from your Sim's inventory on a plot of land in the new lot. Your Sim will now be able to visit the grave, but the ghost will haunt this lot instead of your home.
Cook ambrosia and leave it out for the ghost to eat to turn the ghost back into a living Sim. Once the dead Sim has been resurrected, you can have him move out of the house using conventional means by having him find a new place using his cell phone, a newspaper or computer. You must have a level 10 in the cooking skill and purchase the recipe at the book store to cook ambrosia.