Seeking Perfection
Transistors with their back soldered to the PCB can be a pain to remove and to install, but here's a simple way to do it. Although this method of removal is simple, it does put some work on the legs of the transistor (bend the legs a little), it's only good for a few times on a single transistor, so plan with care.

Procedure
Use the side of the iron to heat up the transistor's metal backing plate until you see things bubbling on the sides and the solder melts.

While the solder is hot, turn the iron over with tip facing the backing plate. Insert the very tip under the back plate with a little force, then pry the transistor with your soldering iron until the entire base separates from the PCB.

Then you may proceed and remove the 2 legs as well. (see removal for more details on how to remove something)

Here's the end result, the amber residues on the side were the stuff that were boiling, it's the flux that was underneath the transistor.

Now to put it back on, we need to prepare our work area. Suck as much solder off the backing plate contact area as possible, a very thin layer is required, excessive solder will only make work more difficult.

Put a very little blob of solder on the tip of the iron. This blob will be making contact with both the transistor backing plate and its mounting area, because with a bare tip, it is almost impossible to heat up both pieces evenly if not at all. Some transistors can be sensitive to heat, you may refer to the sensitives technique.


When solder on the exposed area is melted, use something to press the transistor so it makes a good contact with the exposed area, then proceed with the legs using surface mount technique.
