The Problem with Moisture
Boats live in a damp environment, and moisture inside the boat causes trouble when there is inadequate ventilation. Fiberglass boats are particularly a problem, as moisture in warm daytime air may condense on the cooler hull inside at night. The problem is generally worse when boats are covered during the offseason or not used for a time on the water. Moisture allows mold and mildew to grow, producing unpleasant odors and black mildew spots and ultimately causing fabrics and other interior boat materials to disintegrate.
Ventilation Is the Best Solution
Adequate ventilation through the boat's interior spaces is the ideal solution to prevent moisture buildup, thus preventing the growth of mold and mildew and the associated problems. A boat that is opened up and used frequently seldom has a problem except in very humid environments or when leaks allow rainwater and spray to enter the cabin.
Mechanical ventilation helps provide some relief. Dorade boxes allow wind-driven air to enter the cabin, but for a boat sitting unattended, dorades do not result in enough air exchange by themselves to prevent moisture buildup. Another option is to install passive (nonelectric) vents on hatches or elsewhere on the hull; as the wind blows over the vent outside the boat, interior air is exhausted. Like dorades, such vents can help but alone are seldom an ideal solution for a boat not used often - and of course they don't work on a covered boat in the offseason.
Solar-powered vents are increasingly popular and a better solution, although it is not cheap to install several to maintain a good air exchange. Solar vents have solar cells on the outer surface, which charge a small battery that powers an exhaust fan. Manufacturers claim an exhaust capacity up to 25 cubic meters per hour in full sunlight. Successful ventilation depends in part on the positioning of such vents so that the interior as a whole is ventilated, rather than air pulled in at one location being immediately evacuated at a point a short distance away, leaving rest of the cabin air to stagnate.
More powerful electric vents are also available, using either the boat's battery or external power at the dock or during the winter when covered. This can be a great solution when available but is simply not practical for many boaters.
The Calcium Chloride Solution
Calcium chloride is a chemical salt that attracts water vapor from the air. It won't drop the humidity to zero, but it does help lower humidity considerably in the absence of continual ventilation. It significantly prevents the growth of mold and mildew for a covered boat (no matter how tightly covered, moist air still finds its way inside).
The cheapest way to use calcium chloride in the offseason is to purchase it in bulk as a sidewalk ice-melting product (be sure to read the label to ensure it is calcium chloride and not a different melt product). Pour several pounds into a large container like a drywall compound bucket - or better yet, two or more - and leave the buckets out in different parts of the boat before covering for the winter. In the spring you'll find the dry crystals fused into a mass of puffed-up little white balls, possibly with liquid at the bottom. (I learned this technique from an old salt at my boatyard.)
You don't want to have open buckets of the chemical sitting around on the boat during the active season, however. When the boat is in motion, and also for winter use by those who prefer a "cleaner" alternative, try using DampRid, a moisture-removal product made for houses, basements, boats, etc. and available at many hardware stores. The large tubs contain calcium chloride but also have a top barrier cover that prevents spills. A gauge on the side lets you monitor how "full" the container gets, and then you simply throw it away and start another one. The product is available also in refillable tubs and smaller hanging units for lockers and smaller spaces.
Because I've had mildew problems in the past, this last winter I used one large bucket of calcium chloride in the main cabin and two 4-lb high-capacity DampRid tubs, fore and aft in my 38-foot sailboat. I was delighted in the spring when I opened up the boat. While there was still some musty smell from being closed up so long, I found no active mildew and the mustiness soon vanished with air exchange. I will be using this product from now on!