NEW YORK — Hostess is betting on a sweet comeback for Twinkies when they return to shelves next month.

The company, which went bankrupt after an acrimonious fight with unionized workers last year, is back up and running under new owners and a with leaner structure. It plans to have Twinkies and other snack cakes on shelves starting July 15.

Based on the outpouring of nostalgia sparked by its demise, Hostess is expecting a blockbuster return next month for Twinkies and other sugary treats, including CupCakes and Donettes. The company says the cakes will taste the same but the boxes will bear the tag line ‘‘The Sweetest Comeback In The History Of Ever.’’

‘‘A lot of impostor products have come to the market while Hostess has been off the shelves,’’ said Daren Metropoulos, at the investment firm Metropoulos & Co., which teamed up with Apollo Global Management to buy a variety of Hostess snacks.

Hostess Brands Inc. was struggling for years before it sought Chapter 11 bankruptcy reorganization in early 2012. Workers blamed the troubles on years of mismanagement, as well as a failure of executives to invest in brands to keep up with changing tastes. The company said it was weighed down by higher pension and medical costs than its nonunion competitors.

Hostess hired restructuring expert Greg Rayburn as its chief executive. But Rayburn failed to reach a contract agreement with its second largest union. In November, he blamed striking workers for crippling the company’s ability to maintain normal production and announced that Hostess would be liquidated.

The shuttering triggered a rush on Hostess snack cakes, with stores selling out of the most popular brands within hours.

About 15,000 unionized workers lost their jobs in the aftermath.

Hostess sold off its brands to different buyers. Its major bread brands, including Wonder, were sold to Flowers Foods, which makes Tastykakes. McKee Foods, which makes Little Debbie snack cakes, snapped up Drake’s Cake, which includes Devil Dogs and Yodels.