To remove foreign and harmful substances from something.
To make something that is harmful more benign.