I’ve found that it’s a lot easier just to take my sawzall carefully down the side of the box and cut the nails off even with the studs. Then you can just pull the box straight out of the wall without damage to the sheetrock.

Steve