A procedure for defrosting the evaporator of a heat pump with a coolant circuit containing an evaporator, a compressor, a liquefier and an expansion valve, has additional thermal energy added from outside to the coolant during the defrosting phase. The energy is added to the circuit between the evaporator and the compressor. Between the output of the compressor and the input to the evaporator there is a hot gas pipe, where the heat source (11) is switched in during defrosting. The heat source is electrical.