The original plan had been to shut the “most dilapidated” jails and sell the sites for housing.