Before removing the cables, always connect and remove the whole cable from the negative side of the battery first and connect the positive cable last in a way that excludes you from accidentally shorting out the battery with the tool you used to pry the clamps loose; Even if replacing the cable of the positive terminal only, the negative terminal cable should be detached first. Reverse the old cables from the battery, identify each of them and remove the opposite end, and route each of them in a manner that will allow it to be connected properly. If replacing any of the old cables, it is important to bring the cables to the store to buy new ones since it is vital to install equivalent cables. Scrub the threads of the solenoid or ground connection with a wire brush to clean off rust and corrosion and to apply layer of battery terminal corrosion inhibitor or petroleum jelly to avoid future corrosion on the threads. If the cable is to be connected to the solenoid, then secure the cable ends to the solenoid using the help of an Allen key to tighten the nut on the cable or if connecting it to the ground connection, align it properly and tighten the bolt tightly. Whenever you want to connect a new cable to the battery make sure that it should be touching the battery post without any stretching of the cable, Then connect the cable with the positive terminal of the battery, then next thing you connect a ground cable with the negative terminal of the battery.