As coronavirus sweeps through America’s state and federal prison systems, some of the most high-profile criminals are asking for early release to avoid contracting the sometimes-deadly virus. State and federal governments have been selective about who gets to leave and who has to stay, making the decisions based partly on an inmate’s vulnerability to COVID-19 using factors like age and pre-existing conditions. Some states, including New York and Pennsylvania, have instated sweeping rules allowing the most vulnerable prisoners nearing the end of their sentence to be released early.

Here’s just a few of the most infamous inmates who've been granted the sweet taste of (temporary) freedom — and those who have to wait out the remainder of a worldwide pandemic behind bars.

RELEASED

Michael Avenatti

The attorney who rose to prominence after representing retired porn star Stormy Daniels in her lawsuit against President Donald Trump is the latest celebrity to get an early release from jail, Friday morning, thanks to concerns over COVID-19.

He’ll be allowed to await his sentencing on the outside for a total of 90 days, after which he’s required to return to jail.

In 2019, Avenatti was arrested for numerous federal charges, including extortion, fraud, and embezzlement. In February, he was convicted of trying to extort Nike for more than $20 million. He’s scheduled to be sentenced June 17 and faces up to 42 years in prison.

Michael Cohen

Michael Cohen will get to serve out the remainder of his three-year sentence at home, thanks to the coronavirus outbreak in the New York federal prison he’s been held at since March 2019, according to his lawyer.

President Trump’s former fixer and personal attorney, who was sentenced in December 2018 for using campaign funds to cover up Trump’s alleged extra-marital affairs, has been doing his time at the low-security Otisville Federal Correctional Institute in upstate New York. At the time, Otisville had already seen a total of 21 coronavirus cases, 14 of which were fellow inmates.

Cohen will have to self-quarantine at the prison for another week before he’s released to serve the remainder of his time in home confinement -- possibly somewhere in Manhattan.

Tekashi 6ix9ine

Daniel Hernandez, better known as the Brooklyn rapper Tekashi 6ix9ine, suffers from asthma, one of the pre-existing illnesses that can worsen the effects of the coronavirus and even make it fatal in some cases.

He was released into house arrest on April 2 to serve out the remainder of his two-year sentence for racketeering, firearms, and drug trafficking.

"He's out and he's very happy to be released," Lance Lazzaro, Hernandez’s defense attorney, told NBC News the day his client was released. He will serve time at his home, the location of which hasn’t been made public.

Rick Gates

On Tuesday, the former deputy to Trump campaign manager Paul Manafort who was sentenced to 45 days in prison and three years of probation for lying to the FBI, got word he can serve the remainder of his time at home in Virginia.

The reason? A Washington, D.C., judge ruled Gates’ intermittent confinement, which meant constant travels between his home and prison on the weekends, posed too much of a risk to his wife, who is battling cancer.

"Mr. Gates must now provide additional care for his family for the foreseeable future while his wife continues her treatment for and recovery from cancer," Gates’ attorney Tom Green wrote to a federal judge two days before his release. "The massive societal disruptions caused by this pandemic are tragic, and the burdens they have placed on Mr. Gates and his family warrant a modification of the condition on his probation."

NOT RELEASED

Reality Winner

Reality Winner, the 28-year-old former Air Force intelligence contractor who pleaded guilty to leaking NSA documents about Russia’s interference in the 2016 election, asked to serve the remainder of her 63-month sentence from her parents' home in rural Texas.

But U.S. District Court Chief Judge J. Randal Hall denied her request on Friday because she doesn’t have a pre-existing condition that puts her at risk.

“Winner is in a medical prison, which is presumably better equipped than most to deal with any onset of COVID-19 in its inmates,” Hall ruled.

R. Kelly

The R&B crooner — whose years of questionable relationships and alleged sexual activity with underaged girls finally came to a head in 2019 — has made it no secret that he thinks he doesn’t deserve prison time. Earlier this month, Kelly requested an early release from prison citing that he was too famous to successfully flee his home in Chicago.

But April 7, a judge formally denied his request to leave the Metropolitan Correctional Center in Chicago, where he’s awaiting trial for 18 federal counts, including aggravated sexual abuse and child pornography, in New York, Minnesota, and his home state of Illinois.

"The defendant is currently in custody because of the risks that he will flee or attempt to obstruct, threaten, or intimidate prospective witnesses,” U.S. District Judge Ann Donnelly in the Eastern District of New York Donnelly ruled. “The defendant has not explained how those risks have changed.”

Bill Cosby

Following an order on April 10 from Pennsylvania Gov. Tom Wolfe to temporarily release non-violent and medically vulnerable prisoners close to the end of their sentence, Cosby’s lawyers quickly sought out a reprieve for the 82-year-old, claiming that his many ailments made him susceptible to coronavirus.

The Philadelphia Department of Corrections denied Cosby’s request because his status as a sex offender apparetly exempts him from the governor’s order.

Cosby’s attorney Andrew Wyatt was not happy about this.

“The news was shocking to all of us because we were told by sources close to Gov. Wolf that Mr. Cosby would be a direct beneficiary of his executive order," he told USA Today last week. "Mr. Cosby wasn’t given a life/death sentence, but we feel that the state of Pennsylvania is trying to execute Mr. Cosby, by exposing him to this virus."