The surface must be washed with a solution of detergent or soda even in those places where it was not polished. Before painting, the wall needs to be washed, if it is very dirty — you need to wash only from top to bottom.
To clean the cracks and angles of profiled products, you need to wrap a bottomless fabric moistened in a white spite or denaturate on a wooden rod and remove the crumbs.