Turn off the power to the light box at the breaker box.
Remove the light fixture from the light box. Undo the wiring by untwisting the wire nuts and unhooking the wires from one another. Unscrew the light fixture from the ceiling light box with a screwdriver.
Examine the light box to see if it is screwed or nailed into place. Remove a screwed-in light box with a screwdriver. Pry a nailed light box away from the ceiling joists with a pry bar or hammer.
Pull the light box away from the ceiling, threading the wiring out of place as you pull the box down.
Install a new box following the manufacturer's instructions.