A representative for Hostess says a U.S. Bankruptcy Court judge in New York approved the two deals Tuesday.
McKee Foods Corp., the maker of Little Debbie snack cakes, will buy the Drake's business for $27.5 million, gaining Devil Dogs, Ring Dings, Yankee Doodles and other products.
United States Bakery Inc. will buy Sweetheart, Eddy's, Standish Farms and Grandma Emilie's bread brand, plus four bakeries and 14 depots for $30.9 million.
The two buyers had been lead bidders for their purchases.
Irving, Texas-based Hostess filed for Chapter 11 protection in January 2012 after years of turmoil.