Dissolve it in (anhydrous, pre-dried) ethyl acetate/ether/acetone/chloroform, shake it over anhydrous magnesium/sodium sulfate*. Filter off all the salts and shit that doesn't dissolve. Evaporate the solvent. (heat gun + pyrex baking tray + good ventilation) I dunno if cocaine freebase dissolves in naptha/pet ether, I think it does though, so you can use them too.
This will also remove salts, chalk and silica, and sugars and shit (some common shady ass cuts).
* anhydrous magnesium sulphate can be prepared by baking out epsom salts in an oven for 2-4 hours at 400c until they are white and crunchy. crush it finely in a mortar and pestle (preferably bake it out again some more) and store it in a dry air tight container. once it's cool you can add it to acetone or other solvents to remove water from them.
otherwise if you're lazy go get a bunch of those silica gel packets, or dry white rice, and store your rocks in an air tight container with those. the rice/silica gel will absorb moisture.