Most of the data belonging to 117 million RadioShack customers is safe.

The bankrupt chain originally proposed selling the information to raise money and repay creditors. But that sparked a backlash from suppliers including AT&T (T) and Apple (AAPL), as well as the Federal Trade Commission and consumer advocates who argued that the electronics retailer had promised customers it would protect their data.

RadioShack struck a deal with a coalition of 38 state attorneys general to destroy most of RadioShack's consumer data, and stipulated that no credit or debit card account numbers, social security numbers, dates of birth or even phone numbers would be transferred.

"This settlement is a victory for consumer privacy nationwide," said Ken Paxton, attorney general in RadioShack's home state of Texas. "It reflects a growing understanding of the importance of safeguarding customer information."

The agreement was part of the sale of all of RadioShack's assets for $26.2 million, and was approved by the bankruptcy court late last week.

Related: RadioShack trying to sell data of 100 million customers

Most of the assets, including some limited customer information, were purchased by General Wireless, a subsidiary of RadioShack's largest shareholder, which intends to keep 1,750 of the stores open with the RadioShack name and operate its online business. General Wireless agreed not to sell the customer data it is buying to a third party, and to comply with RadioShack's previous privacy promises.

RadioShack filed for bankruptcy in February, and the court could have allowed the sale of the data despite the promises that RadioShack had previously made to customers.