The gas and water supplies should both be disconnected before installing a new gas hot water tank. When installing an electric hot water tank, the power and water lines should be disconnected.
Individuals should turn the breaker off or remove the fuse before replacing an electric hot water tank, and power lines should be tested with a voltmeter or circuit tester before disconnecting. It's a good idea to verify that gas going to a gas water heater is shut off by visually inspecting the pilot light and smelling the area. The previous hot water tank should be drained before it is removed. Leaving a hot water tap open or disconnecting the hot water output pipe hastens this process.