Wow! Who knew there were so many ways to remove smells from knitting yarn? After gathering up lots of ideas, I started with the easiest ones and particularly ones where I didn't have to trot off to the shops buying up all sorts of expensive products.
I got out a large laundry washing bag and put the balls of yarn into the bag. I hung the bag on the clothes line where the yarn would receive some gentle rays from the sun. After a couple of hours of sunshine and fresh air I lightly sprayed each of the balls - front and back - with 'Febreze' fabric refresher (already had it at home but readily available at the Supermarket). After a few more hours I turned the bag around to make sure the other side received the last of the sunshine for the day. I then found a plastic container with a lid (just large enough to fit the yarn) and sprinkled a layer of Bicarbonate of Soda (Baking Soda) over the bottom of the tub. I placed a few sheets of paper towel over the Bicarb and put the washing bag with the yarn into the tub. I closed up the container and left it over night. And in the morning - no more musty smell. Fantastic.
Other ideas to put into the container (or you can use a zip lock bag) include - kitty litter, activated charcoal, dryer sheets, sticks of spearmint chewing gum, bar of pure soap, pieces of newspaper. There were also other ideas about washing the yarn with lemon, fabric softener, vinegar and mild soap products. Of course, you can also use these ideas to remove the smell of smoke and other unsavoury odours, and I hope one of these suggestions will work for you too.