David Ladd was trying to move on.

It had been seven years since he was released from San Francisco County Jail, where he had served time for a felony, and he thought he could continue with his life. But then, out of nowhere, he said, he got a bill from San Francisco Superior Court for $2,725 in administrative fees: a $135 booking fee, a $240 restitution fine, $1,800 in probation costs and so on.

“I was thinking, ‘Oh, my God,’ I’m going to have to cut back on a few things,” Ladd, 57, said. “That’s a whole month’s rent.”

Ladd is one of countless people around the country who have left the criminal justice system only to find themselves burdened by thousands of dollars in administrative fees. But under a new order by San Francisco Superior Court, which will be announced publicly Thursday, the county has started waiving such fees, going back to early August.

In total, about $32 million in fees from about 21,000 people are being forgiven under the new order.

“We should be actively helping people to get their lives back on track after they have paid their debt to society,” Mayor London Breed said in a statement. “Garnishing the wages of people facing the challenging task of securing employment and housing can make that impossible.”

Thursday’s announcement builds on legislation Breed spearheaded when she was on the Board of Supervisors. After passing the board unanimously this summer, the ordinance prohibited the city, county and courts from collecting such fees on people exiting the criminal justice system. But the law wasn’t retroactive, leaving tens of thousands of people — like Ladd — still facing these costs.

That changed after the San Francisco Public Defender’s Office and the District Attorney’s Office petitioned Superior Court on behalf of about 21,000 people to waive the fees. The city initially estimated that about $15 million would be waived, but the number actually totaled $32 million.

The point is to lift the financial burden from people leaving the criminal justice system, many of whom have low incomes and can’t afford the fees. While not punitive, the fees were intended to cover the costs of criminal justice programs. But the Office of the Treasurer and Tax Collector found that more than 80 percent of the bills went unpaid, so the city received minimal benefit. San Francisco was the first city and county in the country to waive such fees.

“These fees were not doing their job ... These are people who have paid other consequences,” said Anne Stuhldreher, director of San Francisco’s Financial Justice Project, which assesses local fines and fees in the city and county. “These fees are designed to recoup costs, and they don’t do that. We need to fund our criminal justice system in a more fair and just way than on the backs of poor people.”

By eliminating the fees, the city estimates it will lose about $1 million annually. The financial hole will be filled from other parts of the city’s budget.

In August, Ladd said he suddenly saw his bill drop from $2,725 to $640 — a more more manageable amount for him. The remaining fees are ones that he owes to the state, which the city ordinance could not address.

Ladd had been through a lot since 2011. As a veteran, he was dealing with a long-term leg injury and his leg was eventually amputated. Finding work is nearly impossible because of his disability.

“It’s insane, you just can’t get yourself together,” he said of the administrative fees. But the forgiveness from the city has helped him “a great deal.”

And now, he said, he can move on.

Trisha Thadani is a San Francisco Chronicle staff writer. Email: tthadani@sfchronicle.com Twitter: @TrishaThadani