It depends on how severe the smell is, first start by cleaning the entire house, this includes wiping down all surfaces, windows, counters and cabinets lights, ceiling fans etc.
The walls and ceiling will require a stain and odor blocking primer as in oil based kilts.
Removing carpet, drapes or any other fabrics, including window shades/ blinds.
You will also want to hire a duct cleaning company to clean and treat the duct, indoor blower and inside ac coil ( evaporator).
Bobvila.com expert moderator
Build America Construction
One of my colleagues had this problem with a place he bought and he tried odormedic. He swears that not only did it get rid of the odour but visitors commented on how fresh everything smelt in the house. You may choose to try it.