If the books are valuable, you may want to consult a conservator if any stains remain. Be sure books are completely dry. Take books outside and carefully brush them off with a new paintbrush. If you wish to remove any stains, consult a conservator. To prevent mold and mildew, keep books dusted.
Dirty books are particularly vulnerable.
It's difficult to get musty odor out of books. Try putting the books outside on a dry, bright, and airy day. Keep them out of direct sunlight. Be sure to fan the pages out. Do this for several days.