To banish a ghost:
This banishing spell will expel a ghost from the world of the living and into the afterlife. If you are seeking to free a benevolent ghost who actually wants to leave the physical world, then it would be a better idea to perform a spell to help a spirit cross over. However, if we are talking about a malicious spirit that does not want to leave, you can use the following incantation:
“Ashes to ashes,
Dust to dust,
May the wind blow you, wandering ghost
And clear the world of the living,
Turn you to where you belong,
And may you disappear without a trace.”
Without using a spell like this, getting rid of a ghost can be really difficult. Non-witches who want to banish the spirit of a deceased person once and for all may need to use the traditional method, which is the most reliable of all: finding the remains of the dead body, sprinkling them with salt and burning them.
See also this more advanced protection against harmful spirits.