This phrase is repeated many times in Deuteronomy. But of course the Hebrew is more concrete and graphic. I would translate it as "You will burn away the badness from your midst." That is what I have been doing to (programming) code for the last 6 months.