Let's look at some of the definitions of the word purity: "the condition or quality of being pure; freedom from anything that debases", "freedom from foreign or inappropriate elements", "being undiluted or unmixed with extraneous material".
For wisdom you must first obtain purity of knowledge, ie: get rid of all unnecessary knowledge.