Hm, so wrapped cubes were more expensive than loose sugar in a bag. Erm, so why didn't they just decide not to wrap those cubes anymore? That would save even more money I'd say. I mean, look at the evidence:
Switching from wrapped cubes to bags: Adapt, or replace, machines so you can deal with loose sugar. Design new bags. Purchase (or design!) machines to make said bags. Make bags. Also note these bags use more material for the same amount of sugar.
Switching from wrapped cubes to unwrapped cubes: Discard the wrapping machine.