Chemistry books tell that a fairly general reagent to remove the attached water molecules is 2,2-dimethoxypropane.
MgCl2.mH2O+mCH3C(OCH3)2CH3=>MgCl2+m(CH3)2CO + 2mCH3OH
I've read elsewhere that the formed acetone and/or methanol may coordinate with the metal; gentle heating usually gives the solvate-free halide.
Another reagent for the same purpose is SOCl2 which, when under reflux, gives the anhydrous halide, HCl and SO2.
Heating hydrated halides under vacuum is sometimes used to dehydrate them. But this operation often leads to oxo halides or impure products.