Mold needs moisture, low light, and a food source in order to thrive. If you keep bread in a cupboard, you've created the perfect environment. Worse yet, you can forget about it until one day you get a whiff of something sharply nasty. Bread in a plastic bag left in a cupboard for a month can turn into a slimy, green-black mess. It's a simple cleanup, as long as you hold your nose. If you have mould allergies, wear a respirator during the process.
Put on rubber gloves. Put on a respirator if you have mould allergies or respiratory problems.
Remove the offending bread from the cupboard, disturbing it as little as possible to keep spores from puffing up into the air. Place the bread in a plastic bag, even if it's in a bread bag. Seal the bag and put it in a garbage can outdoors.
Remove everything else from the cupboard. If it's paper, throw it out. If it's washable, scrub it in hot water and dish washing detergent. Set the washed items aside to dry.
Fill a container with equal parts vinegar and very hot water. Dip a scrubbing sponge in the mixture, and then scrub the top, sides, and bottom of the cupboard. Rinse out the sponge in hot water frequently. Scrub the inside of the cabinet door.
Leave the cabinet door open and let the cabinet air dry completely. Open windows and turn on ceiling fans to air the musty odour out of the room.
Place a packet or two of silica gel in the cupboard when it's completely dry, and it will absorb moisture and keep mould from regrowing from any remaining spores.
Never reuse bread bags, even if they appear to be clean and dry. There's always a potential for mould from residue left on the plastic.
Don't use bleach to clean mould from wood surfaces. It can damage and discolour the finish.