Q: 2 pipes into heater, in & out, the heater leaks. dont need heater, how do you cap the in pipe or add a piece just something so water wont go in the heater?? they are metal pipes 20 yrs old i dont think there copper, about 1 1/2 – 2 inches.
You most likely have galvanized waterlines to and from the heater. As Art said, there should be unions at the heater that you can take apart. Caps or plugs of the correct size can be bought at any plumbing supply house. However, if the galvanized piping is leaking, it could just be a matter of replacing a nipple which should be a fairly easy task since you’ll already have it disassembled to cap.