use a thin flat blade screw driver to pry up the indents to remove
on the platic stocks, you may need to encourage the movement by using a punch on the lower inside lip, tapping it forward to start loosening it up.
straighten the ferrule with flat nose pliers as needed.
reinstall to new stock with epoxy putty or jb weld and before the stuff hardens, use the centerpunch to push the metal back into the retaining recesses.
there info in the stickies on this whole process.