How were the temple and priests purified in Ezra and Nehemiah?

In Ezra & Nehemiah, there is much talk about "purifying" the temple & the priests. How did that happen. Thank you.

Ezra 6:20 and Nehemiah 12:30 are examples of what the question is addressing. The Bible says purification was done with water and blood! In Numbers 8, we see the Levites were purified with the sprinkling of water, and in Hebrews 9:19-22 we see they did not just use water, but when they purified, they also offered sacrifices - and the blood of the sacrifice was used for sprinkling for purification.