The only time I tried to (and succeeded!) in actually fixing a power supply was by replacing a burnt chip and failed electrolytic cap. Probably the cap went first... Desoldered the parts from the PCB, replaced with new ones, and it all worked again.
Completely replacing a power supply with a new one is a whole different level! I'd even not bother making my own linear regulator. It's so much easier (and cheaper, and more reliable) to just buy a ready-made one.