During a pacemaker replacement, typically only the pulse generator is exchanged, while the leads (electrodes) connected to the heart are usually retained. This replacement of the pulse generator is generally performed through a minor surgical procedure.