The game itself does not offer a way to remove the ghosts.
But you can just delete the bones.* files in /saves to get rid of ghosts.
In fact, I used to do this with a little shell script, but I was wrong to do so:
- Ghosts make you think about the strength and weaknesses of your last and current toon.
- They drive home a very important point on playing crawl: You are on the run. There is no class combo that can just plow through the whole of the game. You have to learn to circumvent enemies anyways, and ghosts are easy to circumvent.
- Ghosts are a nice boost to XP.
- Would you disable Sigmund, Menkaure and others because they kill you? Ghosts are just as much a part of the game as named mobs.
Running from monsters is a natural part of Crawl, there is no way around it. Once you accept that, the few ghosts you encounter are just XP to pick later.
Nerdly confessions: I used to have a set of scripts to remove ghosts, commit saved games to subversion, restart the game after comitting, revert failed games etc. Did that allow me to reach deeper levels? Yes. Did that make me a better player? No. It made me better at shell scripting, though.