NiCd or NimH cells use vinegar. Other alkaline cells as well, followed by a rinse with a paste of baking soda and a final few water washes while scrubbing with a nylon brush. Finally with bare metal use a light coat of grease, baseline or siliconer grease, to keep the bare metal from corroding further.