Getting rid of tobacco odor is a real challenge. The reason is that smoke particles are extremely small and have the ability to penetrate almost everything. It is not just the odor that is difficult to remove. Brown residue produced by nicotine adheres to many surfaces, becoming very difficult to remove. So, if you are about to move into a house with this problem what can you do?

Start with the basics, get some air flowing by opening windows and doors. Place natural odor absorbers throughout the house. Citrus peel, baking soda, and coffee grounds are all good choices.
Get rid of as many items from the home as you can. For example, it would be a good idea to replace all the light bulbs in the home, as these will likely have nicotine residue on them that will heat up and be diffused into the air when turned on. Any carpeting in the house should also be removed and replaced. Make sure that before installing new carpet, you have thoroughly cleaned and dried the flooring underneath. Clean hard surfaces (except wood) with an ammonia-based cleaner that works well at removing nicotine.
Nicotine has a nasty habit of seeping through paint, so before you paint and decorate the home, research which paint will work best for this problem.
These are just a few of the preliminary steps you can take to eliminate nicotine and tobacco odor from your new home.

