Buildings, houses, even the environment outdoors can and still will retain energy even though the people involved have gone away if the emotional energy was of such strength to cause an imprint. It takes about 7-10 months for this to fully leave the vicinity, dissipating very slowly. So in all it will be close to a year before the energy has FULLY left, yet slowly and steadily does fade away.
As to what method works the best, I would have to say that saying prayers and Sea Salt do the most good. Many times people think that Sea Salt is just like taking a spice from the cupboard and then sprinkling it around like a cook would season their food while cooking, yet Sea Salt has the element of the natural product of the Earth without any additives, and has the benefit of causing the fluctuation of vibration due to this elemental energy mass. It is "of the Earth" so it has that clear property and yet makes for two Elements being combined which is the Earth, and the second Element of Water, as Sea Water is where the salt resided in. (Remember that there are four basic Elements of the Earth being "Water, Air, Fire and Earth". So now understanding that the Sea is the location of where the salt originated from, plus being of the land or Earth Element, you can sense the importance of the two basic Elements having their mark left on this product of Sea Salt. Why does it have such strong properties? Because it makes for the whole energy mass of this negativity to now become enmeshed into the foundation of the world, and then incorporated into it through the resonance of the vibratory rate "of the Earth". As to how much sea salt and where to place it, I suggest to use about a cup total, placing one-fourth cup at each of the four corners of the room on the floor. If you want, you can place it on a paper towel or wax paper, etc. so it doesn't rest directly on the floor for the sake of clean up afterwards. Do this in each room that you have sensed a negative spirit's presence. How long should it remain? It can be there indefinitely, as there is no expiration of the properties. You can leave it there till it simply has proved to you that no longer are there troublesome negative beings connecting with your house in any way. I also suggest to say a prayer when you are placing the salt in the four corners, praying that God will alleviate the problem. Pray from your heart and use your own words in your request to God. Heart-felt prayers always reach God.
Next with the saying of the prayers being added into it with now the Sea Salt causing the fluctuation or disturbing of the wavelength, it is much like "stirring the pot" when someone is cooking it on the stove. That fluctuation makes the wavelengths now being generated into movement and some of that now moving negative energy does "flake off" or swirl away since it is no longer in a state of stagnantly remaining there. This now moving negative energy which looks like wispy thread-like darkish strands in a dark shade of bluish gray is in motion due to the Sea Salt. When you pray in all the four corners of the building or home, etc. it will now cause a wavelength of the Holy Spirit invited through prayer to be making the energy slowly and gently moving outwards (traveling out and away) in a loving yet smooth transitional way. You don't want to disturb it too suddenly or rapidly as that will tend to make the pieces of this wispy bluish gray energy to break apart into larger chunks and then those larger chunks can stay in place a bit firmer due to their now having broken apart rather than lifting up slowly and into even more tiny infinitesimal particles that will scatter and blow away. Consequently it is much better to have the pieces break into very tiny little wispy bits instead of these much larger and harder to get rid of chunks. It has just proven to work much better this way with the tiny particles being dispersed more thoroughly.
So prayers do work, and so does Sea Salt. Next to mention is the white candles, or another shade to use would be a green candle. The reason why is that the white candle is seen by those of the Light and will come with the Intention being that the person who lit the candle was attempting to rid the house of impurity of energy or a negative Spirit, so the white would show them that the Intention was "of the Light". They would add their prayers to this ceremonial attempt that the Earth person was attempting, which would be of benefit. The green candle would reflect the Love of God with the Green Heart Chakra being represented IF the person lighting the candle was thinking of the Love of Christ with the Heart Chakra being represented as the candle in this ceremonial effort and once again this is where the Intention is important. What if you wanted to rid the house of negativity and didn't have a white or green candle? If the candle did not represent anything other than a candle to light to rid the house of negativity, it also would work, too, if once again the Intention was clearly stated while the person lighted the candle and was praying to the Lord for the aid and protection of the house.
I need to explain here that ALL Thought is clearly heard, seen, and can be in a manifesting state. Your Thoughts can manifest the energy that they intend to if the person is trying to force something good, wholesome and positive Through a Spirit Realm Level. So prayers do have energy and this energy is all considered and is reflecting though the level of the Highest Christ Consciousness Plane and can be making something good happen. Thoughts generate energy. That's why the Intention is important to consider.