The dark, damp confines of a cabinet create an ideal environment for fungi. The growth of these microbes generally lies at the root of musty odors. Remove the mold and mildew, and the smell will disappear.
Remove everything from the cabinets. Place all washable items in a sink filled with hot, soapy water and let them soak. Pull up any shelf liners and throw them away.
Push a brush-end attachment onto the wand or hose of a standard vacuum cleaner. Sweep the nozzle over the surfaces of the cabinets, paying particular attention to corners as this is where dust, dirt and crumbs tend to accumulate.
Pour 2 tablespoons of liquid dish-washing detergent into a large bowl or bucket. Add 1 gallon of hot water. Stir the mixture vigorously until the solution forms a thick lather. Dip a cloth into the soapy water. Wring the fabric firmly, removing any excess fluid. Scrub the cabinet with the moist material, cleaning one small section at a time. Wipe each area with a damp cloth to rinse. Dry immediately with a clean towel.
Mix 3/4 cup of chlorine bleach into 1 gallon of cool water. Apply this solution to any interior surfaces with a damp sponge to disinfect the cabinet and discourage the growth of mold and mildew. Wait 15 minutes then wipe the solution away with a damp sponge. Buff with a clean towel to dry.
Sprinkle baking soda across the newly washed shelves and drawers to absorb any remaining moisture and eliminate stubborn smells. Close the cabinet for 24 hours, then sweep the baking soda away with a stiff-bristled brush.
Fill a clean sock with ground coffee. Secure the open end of the sock in a firm knot and place this natural deodorizer near the back of the cabinet. The ground coffee will absorb any residual musty odors.