An accused Upper East Side brothel boss is so hard up for cash that she’s had to evict most of the pigs she keeps in her upstate home to save money while she remains locked up in jail on $2 million bond.

The family of accused madam Anna Gristina, who’s got a soft spot for porkers, has sent away all but two of the seven rescue pigs she keeps in order to save the hundreds of dollars per month she spends in upkeep for them at her Orange County farm, her husband told The Post yesterday.

“My son was really upset,” Gristina’s hubby Kelvin Gorr said of the decision to relocate those hogs to two other farms.

Among that non-bacon given the boot was “Wilbur,” a 300-pound, fanged boar which in February chased a cop who had come bearing a search warrant to seize Gristina’s paperwork and computers after her arrest.

Only two relatively small sows — Gerty and Iris — remain on Gristina’s 200-acre farm in Monroe.

Gristina also remained where she was yesterday — in the jails of Rikers Island, as her lawyer Gary Greenwald tried yet another tactic in Manhattan Supreme Court to get her released on a lower bail.

Greenwald, saying that the current $2 million bail set for Gristina is “exorbitant,” filed a writ of habeas corpus seeking to have a Manhattan judge other than the one handling her criminal case adjust the bail downward.

If he doesn’t prevail in arguments on that point on April 9, Greenwald vowed to press his case in the court’s Appellate Division.

“This is bail that murder cases get,” Greenwald griped to reporters. “I don’t believe any competent judge is going to allow that bail to stand.”

Greenwald also questioned why the probe into Gristina by the Manhattan District Attorney’s office has dragged on for as long as eight years, with only charges filed against her, her alleged money-laundering accountant and several alleged prostitutes to show for it.

“Maybe they’re looking for someone who never showed up,” Greenwald said. That was a coy reference to the fact that the probe is being handled by the DA’s official corruption unit because of suspicions Gristina had the help of cops and other authorities to stay out of trouble for years.

No one that meets that description has been charged in the case.

Prosecutors have argued, and a judge agreed, that Gristina’s sky-high bond was warranted by her potential to flee, given her holding of British citizenship and her ownership of property in the Quebec province of Canada.

If the bond remains at $2 million, Gristina’s family will continue having a difficult time coming up with the premium to be paid to the bondsman as a fee, which a source said could be as high as $100,000.

“Right now we’re just in a holding pattern,” said celebrity bail bondsman Ira Judelson, who wrote the $5 million bond for accused hotel maid attacker Dominique Strauss-Kahn.

“I’m working with the family to try to get Anna home to her child,” said Judelson.

Gristina’s ex-lawyer and friend, Peter Gleason,yesterday repeated his offer to post his TriBeCa apartment as collateral for her bond.

Also yesterday, in a closed-door session with Greenwald, prosecutors turned over some investigatory materials they had been withholding from the defense, but continued holding on to others pending Manhattan Supreme Court Justice Juan Merchan’s decision on restrictions over the handling of that evidence.

Prosecutors had demanded, among other things, that the defense be barred from sharing some of that material with third parties.