How to permanently get rid of old cigarette smell from previous resident?
I had a house I purchased that had previous residents that were very heavy smokers. Everything in the house was covered in a yellow brown film. Steps I had to take to remove the smell.


All hard surfaces were washed twice with TSP in hot water. This was necessary because the yellow gunk was so thick that the first washing just could not get it all off. Changing the wash bucket often was also necessary.
Pop corn type ceiling texture in the whole house had to be scraped off. Then the ceilings were sealed with two coats of a roll on sealer and a new ceiling texture sprayed on.
Complete stripping of the finish on all of the kitchen cabinets and re-finishing with new stain and polyurethane.
Every wooden door and trims were washed with TSP and then repainted with four coats of new paint.
All carpet and padding was removed. Open floors were left for a week or so to air out before new carpet was installed.
Every wall surface was repainted with at least two coats of new paint including inside of closets. In the worst rooms, such as the kitchen, vinyl wall paper was installed instead of painting. Bathrooms also got the wall paper treatment because those rooms were almost as bad as the kitchen.
Had to go into the attic with a shop vac and clean away years of smelly dirt and dust. This was an old house in warm climate and so there was no insulation in the attic. Thus replacement was not needed.


There were probably other things I did that I do not recall as this was over 30 years ago. As I did most of the work  DIY the cleanup and redecoration of the house took almost a year and a half. After that there was no noticeable old smoking smell.