The Pennsylvania Supreme Court ruled that the prosecutor who brought the case was bound by his predecessor's agreement not to charge Cosby.
Cosby, 83, flashed the V-for-victory sign to a helicopter overhead as he trudged into his suburban Philadelphia home after serving nearly three years of a three- to 10-year sentence for drugging and violating Temple University sports administrator Andrea Constand in 2004.
After news of Cosby's release surfaced, some agree he should be let out of prison and others say they are disappointed.
SEE ALSO: Bill Cosby leaves prison after court overturns sex assault conviction
"I am sure he probably doesn't have too many years left so I thought he would be in jail for the rest of his life," said Kolonji Smith of East Falls.
"If I was a victim, I guess I would be very upset. But at this point, with his age, keeping him in jail doesn't really serve a purpose other than really to set a precedent," said Suanne Bernacki.
"I think that for victims coming forward for sexual assault or any sort of assault, it just kind of goes to show that will they ever be believed especially as women. We had this big powerful man that is going to walk free despite everything he did to them," added Audrey Cunningham.
Cosby was arrested in 2015, when a district attorney armed with newly unsealed evidence - the comic's damaging deposition in a lawsuit brought by Constand - filed charges against him just days before the 12-year statute of limitations was about to run out.
But the Pennsylvania Supreme Court said Wednesday that District Attorney Kevin Steele, who made the decision to arrest Cosby, was obligated to stand by his predecessor's promise not to charge Cosby, though there was no evidence that agreement was ever put in writing.
"If he is supposed to be let go as per what the Supreme Court says, then he should be let go. It is not anybody else's business. That is why we have laws," said James Crossley of Northeast Philadelphia.
SEE ALSO: Bill Cosby conviction overturned: Timeline of events leading to actor's release
Justice David Wecht, writing for a split court, said Cosby had relied on the previous district attorney's decision not to charge him when the comedian gave his potentially incriminating testimony in Constand's civil case.
The court called Cosby's subsequent arrest "an affront to fundamental fairness, particularly when it results in a criminal prosecution that was forgone for more than a decade." It said justice and "fair play and decency" require that the district attorney's office stand by the decision of the previous DA.
The justices said that overturning the conviction and barring any further prosecution "is the only remedy that comports with society's reasonable expectations of its elected prosecutors and our criminal justice system."
SEE ALSO: DA: Cosby's release is "irrelevant to the facts of the crime"
As Cosby was promptly set free from the state prison in suburban Montgomery County and driven home, his appeals lawyer, Jennifer Bonjean, said he should never have been charged.
"District attorneys can't change it up simply because of their political motivation," she said, adding that Cosby remains in excellent health, apart from being legally blind.
The Associated Press contributed to this report.