I've done it twice, in 2008 and just now.  Several problems:  1) old socket is riveted; 2) tight space to rewire.

I drilled the old socket out (through the rivet).

Next cut off any remaining rivet bur for a smooth flat surface.

Buy a replacement ceramic socket for a ceiling light.  The one I bought had both black and white wires attached to the socket and a few inches of wire to work with.  This is better than a replacement socket without the lead wires as it is very difficult to attach the black and white wire coming out of the pot to the replacement socket.  

Detach the mounting bracket that allows you to screw the socket onto a threaded post.  You don't want it because it will bring your socket down an inch or so and you wont get your end cap back on the fixture.

That mounting bracket was secured by a small screw.  Find a larger sheet metal screw narrow enough to go throw that hole. Also make sure the head of the screw is small enough to fit in the recess area of the replacement fixture.

Drill a hole into the top of the ceiling pot, the right size to securely hold the screw.  When I just recently removed my socket there was a black circular washer spacer attached to the top of the pot used as a buffer against the old socket.  There was a center rivet (which I had cut out) but at 12, 3, 6, and 9 o'clock positions there remained marks (I guess from the four screw hold openings of the old socket).  One of these had been drilled but it was too big for my new screw.  So I drilled a smaller hole in another position.

Secure the socket with the new screw.

There is only one place for this new screw so it will make for a lopsided attachment.  That is the socket wanted to lean towards the side where it was attached by the screw.  To solve this I added three tiny washers to the top side of the screw.  This way the socket was not leveraged to that end when tightened.  Plus if I wanted to position it back a little the other way I could.

Anyway.  it works. 

Can the socket in my recessed light be replaced without replacing the entire framing kit?
follow urxvt: scroll just one line

How can we set keybindings so that shift+up can scroll one line up in xterm?
