Ripen them fast. About a month before your area’s first frost date, pinch off all flowers, new shoots, and the smallest fruits. Keep only those that are about a month from maturity.
Harvest the green ones. Throw away any with blemishes, and clean the rest with a weak bleach solution (1 tablespoon bleach to 1 gallon water). Store in a single layer in a dark area at about 65ºF. Tomatoes need heat, not light, to ripen. This can take up to four weeks.
Keep it clean. Burn or discard diseased plants—never compost them. Wash your hands after working with infected plants. Disinfect stakes with a bleach solution, or get rid of them.