Hi
@mousething19 Welcome to the forum.
Sometimes if the game has housed the ghosts you can delete them straight from the manage world>manage households menu.
If the ghosts are not in houses and do not appear in the manage world>manage households menu then you have to use cheats to delete them: enable
testingcheats on when your sim is out and about and sees a ghost shift click them and then add them to your household. From there you can start moving them all out into their own household and then once you have rounded them all up simply delete that household from your game.
(You can also delete each ghost as you get them into your household just I'm never 100% if deleting sims like that doesn't cause game issues. I have deleted some of my household sims from CAS before but I always think better to be safe than sorry!)
If you have Get Together try not to visit a community bar/lounge lot on
Ghosts Night as that causes the game to spawn in another whole lot of new ghosts.