Investigations by safety officials found that Moor Park School in Ludlow, Shropshire, which charges pupils £15,000 a year, had not devised an effective plan for the work.
Workers had removed crucial structural supports in the room, which caused the 2.4-tonne roof to fall down while they were inside, suffocating 40-year-old local man Mark Evans.
Four other workers were able to escape from the scene past a dumper which happened to be parked inside a section of the building.
HSE inspector Nic Rigby said: "This awful event and the prosecution of the school must send a very clear message to all those who commission construction or demolition work. It must be properly planned and carried out by those with the experience and competence to do so."
Moor Park Charitable Trust, the group which runs the school, admitted breaking Section 3(1) of the Health and Safety at Work etc Act 1974. It was ordered to pay a fine of £25,000 and prosecution costs of £15,000.
Sign up to our email digest