Metropoulos, which owns Pabst beer, has said it hopes to have the cakes back on shelves by this summer.

The judge also approved the sale of Wonder and other breads to Flowers Foods, which makes Tastykakes. Flowers will also get Nature's Pride, Butternut, Home Pride and Merita as part of the $360 million deal.

The sale of Beefsteak, a regional bread brand, to Grupo Bimbo for $31.9 million was also approved.