A refrigerating and air-conditioning apparatus comprising: a plurality of refrigeration cycles that each include a compressor (3a, 3b), a four-way valve (4a, 4b), an outdoor heat exchanger (5a, 5b), a pressure reducing device (6a, 6b), and an indoor heat exchanger (7a, 7b) that are connected to one another, the plurality of refrigeration cycles being capable of independently performing a heating operation and a defrosting operation characterized by; a plurality of indoor units (2a, 2b) each provided with the indoor heat exchanger (7a, 7b) that is included in each of the plurality of refrigeration cycles, the plurality of indoor units (2a, 2b) that each include an indoor fan (8a, 8b) for taking in outside air through the ventilation port (9a, 9b) and sending the air into a room, and a ventilation damper (10a, 10b) for opening and closing the ventilation port (9a, 9b); and a controller that controls the ventilation damper (10a, 10b) to perform indoor ventilation during the heating operation, and that controls the ventilation damper (10a, 10b) of each of the plurality of indoor units (2a, 2b) to close the corresponding ventilation port (9a, 9b) and stop indoor ventilation during a defrosting operation, wherein the plurality of indoor units (2a, 2b) are installed in the same room, and wherein prior to a defrosting operation, the controller performs a prior ventilation operation to increase the amount of ventilation by controlling the ventilation damper (10a, 10b) of the indoor unit (2a, 2b) of a refrigeration cycle that is to perform the defrosting operation, and after termination of the prior ventilation operation, the controller starts the defrosting operation. a plurality of refrigeration cycles that each include a compressor (3a, 3b), a four-way valve (4a, 4b), an outdoor heat exchanger (5a, 5b), a pressure reducing device (6a, 6b), and an indoor heat exchanger (7a, 7b) that are connected to one another, the plurality of refrigeration cycles being capable of independently performing a heating operation and a defrosting operation characterized by; a plurality of indoor units (2a, 2b) each provided with the indoor heat exchanger (7a, 7b) that is included in each of the plurality of refrigeration cycles, the plurality of indoor units (2a, 2b) that each include an indoor fan (8a, 8b) for taking in outside air through the ventilation port (9a, 9b) and sending the air into a room, and a ventilation damper (10a, 10b) for opening and closing the ventilation port (9a, 9b); and a controller that controls the ventilation damper (10a, 10b) to perform indoor ventilation during the heating operation, and that controls the ventilation damper (10a, 10b) of each of the plurality of indoor units (2a, 2b) to close the corresponding ventilation port (9a, 9b) and stop indoor ventilation during a defrosting operation, wherein the plurality of indoor units (2a, 2b) are installed in the same room, and wherein prior to a defrosting operation, the controller performs a prior ventilation operation to increase the amount of ventilation by controlling the ventilation damper (10a, 10b) of the indoor unit (2a, 2b) of a refrigeration cycle that is to perform the defrosting operation, and after termination of the prior ventilation operation, the controller starts the defrosting operation.