The repair I'm describing here involves mains voltage, which can be very dangerous if not handled properly. Do not even think about trying this yourself if you are not absolutely sure what you are doing!
The original power supply of my C64 was broken. Unfortunately it was one of those power supplies where everything inside the case has been glued into one big block filling the entire case. Repairing such a mess seemed next to impossible.