A refrigerator comprising: a compressor for compressing refrigerant; an evaporator configured to carry out heat exchange; a frost sensing unit configured to sense an amount of frost formed on the evaporator; a defrosting heater operated depending on the amount of the frost formed on the evaporator sensed from the frost sensing unit; a heater for removing the frost formed on the frost sensing unit; and a control unit configured to operate the defrosting heater during a defrosting section, and to operate the heater in at least a portion of the defrosting section, wherein an operation time period of the defrosting section is changed based on the amount of the frost formed on the evaporator sensed from the frost sensing unit, wherein the frost sensing unit includes: a light emitting unit to emit a light, and a light receiving unit to receive the light and convert the received light to an electric signal, wherein in case that there is the frost between the light emitting unit and the light receiving unit, the amount of frost formed on the evaporator is sensed based on intensity or a size of the electric signal from the light receiving unit, wherein the control unit is configured to turn on the compressor during a cooling section before the defrosting section, and wherein the control unit is further configured to remove refrigerant from the evaporator between the cooling section before the defrosting section and the defrosting section. a compressor for compressing refrigerant; an evaporator configured to carry out heat exchange; a frost sensing unit configured to sense an amount of frost formed on the evaporator; a defrosting heater operated depending on the amount of the frost formed on the evaporator sensed from the frost sensing unit; a heater for removing the frost formed on the frost sensing unit; and a control unit configured to operate the defrosting heater during a defrosting section, and to operate the heater in at least a portion of the defrosting section, wherein an operation time period of the defrosting section is changed based on the amount of the frost formed on the evaporator sensed from the frost sensing unit, wherein the frost sensing unit includes: a light emitting unit to emit a light, and a light receiving unit to receive the light and convert the received light to an electric signal, wherein in case that there is the frost between the light emitting unit and the light receiving unit, the amount of frost formed on the evaporator is sensed based on intensity or a size of the electric signal from the light receiving unit, wherein the control unit is configured to turn on the compressor during a cooling section before the defrosting section, and wherein the control unit is further configured to remove refrigerant from the evaporator between the cooling section before the defrosting section and the defrosting section. a light emitting unit to emit a light, and a light receiving unit to receive the light and convert the received light to an electric signal, wherein in case that there is the frost between the light emitting unit and the light receiving unit, the amount of frost formed on the evaporator is sensed based on intensity or a size of the electric signal from the light receiving unit, wherein the control unit is configured to turn on the compressor during a cooling section before the defrosting section, and wherein the control unit is further configured to remove refrigerant from the evaporator between the cooling section before the defrosting section and the defrosting section.