Trispodium phosphate (TSP) is an effective cleaner and grease-cutter, and when mixed into a strong enough solution, it can remove paint. While effective, it's also quite toxic and can irritate your skin, eyes and respiratory tract, according to the Hazardous Substances Data Bank. Gentler and less toxic solutions are available to clean walls before painting, even if they are heavily soiled.
Dust the walls from top to bottom to remove cobwebs and dust. Vacuum the floor along the base of the walls.
Mix a cleaning solution in a bucket. About 1/2 cup of dishwashing detergent to one gallon of warm water makes an effective cleaner to remove grease, tobacco smoke and grime. Borax or ammonia with warm water will also work.
Lay folded towels or canvas painter's drop cloths along the floor. For extra protection, put sheets of plastic under the towels to keep the flooor dry.
Clean the walls from the bottom up, using a rag. For very stubborn grime, allow the detergent to remain on the walls for several minutes, and scrub them with an abrasive kitchen sponge. Use plenty of the cleaning solution to keep the walls wet while you work.
Rinse the walls with a second bucket of clean water, this time working from the top down. Allow them to dry thoroughly before painting.