There is a fascinating discussion of ghosts in JRR Tolkien's The Notion Club Papers; which may have been based on similar real life discussions in The Inklings.
It emerged that the club seems to acknowledge that 'all houses' are haunted in the sense that 'haunting and atmosphere... are something added by accident of history... not part of the house itself, qua house.'
How to get rid of ghosts? This is regarded as possible, but not easy. One member says: 'if you destroy an actual house, qua house, you also destroy, or dissipate, the special haunting. If a haunted house were pulled to pieces, it would stop being haunted, even if it were built up as accurately as possible again.'
But another member points out that 'you can go a long way, short of destruction, without wholly banishing atmosphere or laying ghosts (...). Bricking up windows, changing staircases, and things like that.'
This distinction concerning what stops a haunting and what does not, can be summarized by saying that - according to the Notion Club - a house is a living and conscious Being; and 'haunting' is a part of that house's acquired character.
Thus, a particular ghost may be got rid of only by (in effect) killing the house; by destroying its character and starting again with a 'newborn' house.
At the very least, to dissipate a haunting is an act of 'wiping the memory' of a house; and (as we know from humans) it is not really possible to wipe one specific memory (which is analogous to a particular ghost) - and to remove a specific memory entails a much more general act of destruction.
In other words, the idea of haunting and ghosts, insofar as it is real and not merely fakery or error, is a part of an 'animistic' cosmic view that regards created-reality as consisting of Beings.
And those who believe in some kind of animistic philosophy will - presumably - regard at least some houses as alive and conscious; and will regard atmosphere, haunting and ghosts as genuine possibilities.