The U.S. Bankruptcy Court for the District of Delaware confirmed Pacific Sunwear of California Inc.’s restructuring plan Tuesday, a move that enabled the retail chain to emerge from bankruptcy under ownership of lender Golden Gate Capital.

The Chapter 11 process took five months and enabled Anaheim-based PacSun to “significantly” reduce its long-term debt and annual occupancy costs—the retailer now operates 583 stores, or 27 less than it had before the Chapter 11 filing. The count could decline further in coming months as the retailer projects running 475 stores by 2018, according to court documents.

San Francisco-based Golden Gate, in accordance with the bankruptcy plan, wrote off about $58 million of PacSun’s $88-million term loan due in December in exchange for a 100% stake in the company and a new, “secured term loan in the amount of $30 million.” The deal also calls for the private equity firm to put $20 million into PacSun to “support its long-term growth objectives.”

Wells Fargo has provided a five-year, $100 million revolving line of credit, according to PacSun.

“PacSun offers consumers the most compelling and desirable mix of brands celebrating the California lifestyle,” Josh Olshansky, managing director at Golden Gate, said in a statement. “Now, with a strengthened balance sheet, reduced long-term debt and reduced annual occupancy costs, the company is well-positioned to build a stronger future and achieve long-term success.

Chief Executive Gary Schoenfeld said all PacSun’s “branded partners—both large and small—are to be paid in full as part of our plan.”

Schoenfeld thanked “customers, vendors and partners for their loyalty during the restructuring” and expressed appreciation for the retailer’s landlords.

The company has set up $400,000 for “General Unsecured Claims.” Its vendors will be paid in full, getting half of what they are owed now and the rest on Dec. 15, according to court documents.

Olshansky has been on the retailer’s board of directors since 2011, along with Neale Attenborough, an operating partner at Golden Gate, and Schoenfeld. Mike Montgomery, principal at the private equity firm, was added to the board on Sept. 2, while Brett Brewer, David Filler, Peter Starrett, Frances Philip and Michael Goldstein are no longer part of it, according to the court documents.

PacSun also appointed Zohar Ziv to replace Ernie Sibal as its chief financial officer and secretary.