If the existing receptacle or switch is connected through the holes in the back, push a jewelers screwdriver or similarly shaped tool into the slot next to each hole to release the clamp pressure and pull the wire free.
A snap switch wired under the provisions of this exception and located within reach of earth, grade, conducting floors, or other conducting surfaces shall be provided with a faceplate of nonconducting, noncombustible material or shall be protected by a ground-fault circuit interrupter."
Press a small board against the bottom of the outlet box to hold it flush with the ceiling while attaching the support assembly to the joists. Working through the channel, drive deck screws or nails through the holes in the metal hangers and into the joist. Use four screws on both ends of the support, two on each side of the hangers.
Locate the two joists nearest the new fixture location using a stud finder or tap on the wallboard until the sound indicates the general location of the joists. Use a drill and an eighth inch bit to drill through the plaster where the joists are estimated to be. Drill holes at 1" intervals until you meet resistance and wood from the joist is ejected. Mark the location of each joist with a pencil mark.