Attach labelled tags to all the electrical lines entering the panel. This makes reattaching the wires very easy. For each breaker connection, three lines will be entering the panel. Black wire, which is the hot line, is responsible for carrying current. The white wire, which is the return line, provides the neutral connection. The green wire serves as the ground line.
After all of the lines have been labelled, remove them from the breakers and then detach all the breakers. After all the breakers have been removed, remove the wire which provides the ground connection to the ground bar. It is the ground bar which makes the connection between the house ground and the neutral bar.
The main breaker now needs to be removed. Remember to secure the main power breaker while you remove it. This is important to prevent the breaker from touching anything. Hot wires can prove fatal if touched, which is why the main power breaker should be handled with extreme caution. Replace the old electrical panel with a new one.
In the new panel, break holes for the electrical lines. Install the main power breaker in the location designated for it. Feed electrical lines, attaching the neutral line to neutral bar and making connection between the house ground and the ground bar. Moreover, establish a connection between the neutral and ground bars.
Attach the breakers that you removed earlier in their original location and then reattach the removed lines referring to the labelled tags. Try to group a particular area of the house in one breaker. For instance, all lines going to a particular room should be grouped. This will provide you room to add more breakers to the electrical panel.