Two of the nation’s biggest banks will finally put to rest the zombies of consumer debt — bills that are still alive on credit reports although legally eliminated in bankruptcy — potentially providing relief to more than a million Americans.

Bank of America and JPMorgan Chase have agreed to update borrowers’ credit reports within the next three months to reflect that the debts were extinguished.

The move is a victory for borrowers whose credit reports have been marred as a result of the reported debts, imperiling their job prospects and torpedoing their chances of getting new loans.

The change by the banks emerged this week in Federal Bankruptcy Court in White Plains, where the two banks, along with Citigroup and Synchrony Financial, formerly GE Capital Retail Finance, face lawsuits accusing them of deliberately ignoring bankruptcy discharges to fetch more money when they sell off pools of bad debt to financial firms.