A conviction for growing marijuana turned Rob Jenkins' life upside down.

"The police ran in there and took my whole garden apart and trashed my whole apartment," Jenkins says of the 2008 raid on his Oakland, California, home. "I got a notice two weeks later that said get the hell out."

Jenkins was originally charged with a felony—he had a firearm in his home at the time of the raid—but the charges were dropped to a misdemeanor after law enforcement officials confirmed the gun was legally registered. He was able to avoid jail time with a plea deal including two years probation, but his criminal record made it difficult to find a job. So he went back to illegally growing and dealing marijuana.

"I had to sell clones and pretty much risk going back to jail while on probation," Jenkins states. "If you're keeping me from getting a job, but you want me to pay all these legal fees…it's kind of hard."

Jenkins—who resides in a state where recreational cannabis is now legal—is one of an estimated 20 million people nationwide in the last three decades who have been arrested for a marijuana-related violation.

In a move reminiscent of the end of the Prohibition era, when President Franklin D. Roosevelt issued some 1,300 pardons for alcohol-related offenses, officials are now looking for ways to clear these convictions from the public record.

When California voters legalized cannabis in 2016, they also approved a proposition that allowed the state to expunge past convictions. But the law hasn't worked as intended. There are too many bureaucratic hurdles in the path toward expungement.

"The way the legislation was written really kind of put it all on the people that had been convicted," says San Francisco District Attorney George Gascón. "It didn't prohibit us from doing anything about it, but then it also didn't spell out that you should."

Gascón became aware of the magnitude of the problem when his office first started tackling the process of identifying records eligible for expungement. In 2017, the city had more than 9,000 residents eligible for expungement, but only 23 people had petitioned to wipe their records clean.

"It's a really small number and often the people who seek relief are the people that are well off. They're more sophisticated," Gascón says. "There were people that were harmed by decades of bad policy, and I think the government has an obligation to make some reparation. The question became, 'How do we do this, and how much work is it going to take?'"

Gascón turned to Silicon Valley for help, partnering with the non-profit Code for America to come up with a technological solution to the problem of too much red tape.

"A criminal record is an enormous barrier to jobs, to stable housing, to education, to being able to engage in your kids' school activities," says Evonne Silva, Code for America's senior program director. "The technology is actually really simple. It also starts to shift the way in which people relate to their government, because now this is a service provided [by] government as opposed to government being seen as an obstacle."

Silva's group is aiming to clear a quarter-million cannabis-related convictions in California by the end of the year. The program, which is an extension of the group's Clear My Record campaign, uses an algorithm designed in conjunction with each county district attorney. The software examines and flags records eligible for expungement and can automatically file the paperwork with the courts to clear the conviction.

"The difference is, it on average takes an attorney 15 minutes to review one criminal record and evaluate eligibility and prepare the paperwork," Silva states. "We were able to process over 8,000 convictions in San Francisco in a matter of minutes."

While San Francisco was the first county in the state to implement this program, Code for America is partnering with other jurisdictions, including Los Angeles and San Jose, as part of a pilot program across the state. It's hoping to eventually apply its technology nationwide.

Jenkins, who had to pay thousands of dollars in attorney's fees to get his conviction expunged, welcomes the move in cities embracing technology to deal with tedious and time-consuming paperwork.

"It's great," says Jenkins, who now operates his own legal grow operation. "But there's still people in jail right now for cannabis-related offenses. I know eventually they might get released and eventually they might have their record expunged, but that's days lost, time lost with your family. I lost everything when I got arrested. That was a lot of resources that I could have used towards the business im trying to start from scratch right now."

Produced by Alexis Garcia. Camera by Zach Weissmueller and John Osterhoudt.

Photo credits: Everett Collection/Newscom. Additional footage from the Drug Policy Alliance.