Tens of thousands of residents in Chicago and Los Angeles will receive an unexpected holiday gift this month, as District Attorneys in the two major cities prepare to clear tens of thousands of criminal records for cannabis crimes with a few clicks of a keyboard. 

According to the Los Angeles Times, LA DA Jackie Lacey said that her office is using the last few weeks of the year to expunge more than 50,000 minor cannabis crimes from permanent records. In the Windy City, Cook County State’s Attorney Kim Foxx announced plans to clear 18,000 misdemeanor pot possession charges before the state welcomes adult-use cannabis in the new year.

“Prosecuting these cases was not in the public interest, or in the interest of public safety. These convictions kept people out of the housing market, job market,” Foxx told the LA Times. “Folks are going to be making billions of dollars on this, selling it by the metric ton, on the backs of communities that were devastated by the War on Drugs. Is that fair? No.”

Both California and Illinois passed legislation to expunge criminal records of cannabis crimes that are now moot under legalization. In both states, though, the onus was placed on prosecutors to actively delete the pot charges from their databases.

“So many people, particularly in communities of color, have been disproportionately affected by cannabis convictions,” DA Lacey said in a statement. “My prosecutors are working diligently to ensure that we are on track to expunge or reduce 50,000 felony convictions in coming weeks.”

To achieve those lofty goals, prosecutors in LA and Chicago are teaming up with the nonprofit organization Code for America, which specializes in helping governments find tech solutions to bureaucratic roadblocks. Recently, San Francisco was able to expunge more than 8,000 cannabis crimes in a matter of minutes, thanks to software developed by Code for America.

“It took just 10 minutes to do it, once they flipped the switch,” San Francisco District Attorney George Gascon said. “It was crazy fast.”

And after decades of racist cannabis policing in both Los Angeles and Chicago, where black and brown residents were overwhelming persecuted, Foxx said that the automatic expungement process is the least her office can to do make up for past malfeasance.

“We are undoing the harm prosecutors have caused,” Foxx said

Follow Zach Harris on Twitter