Nearly half of the teachers and staff are leaving six of New York City’s most troubled schools — a significant shake-up at a few of the schools the de Blasio administration is on a tight timeline to improve.

The teachers, counselors, and other staffers at those schools were required to re-interview for their positions this spring as part of an agreement between state education officials, the city, and unions. All told, just 54 percent will return: 245 staffers were re-hired, while 112 were not and another 97 did not re-apply.

The six schools are August Martin, Banana Kelly, Fordham Leadership Academy, John Adams, and Lehman high schools, and J.H.S. 80, a middle school in the Bronx.

The staffing changes leave those schools with a major challenge: hiring teachers to fill the newly open positions by the start of the school year. All six have been labeled “out of time” by the state and are under intense pressure to raise attendance, test scores, and graduation rates.

It’s possible that many of the schools will end up with first-time teachers. After Automotive High School in Brooklyn went through this re-staffing process in 2015, the school hired a host of brand-new teachers over the summer. This year, nearly half of that school’s teachers were in the classroom for the first time.

Officials suggested that many of the departing teachers did not belong in those schools.

“As we work tirelessly to turn these schools around and serve their students, we must have the right leaders, the right teachers, and the right school staff in place,” Chancellor Carmen Fariña said in a statement.

Of the six struggling schools, some will see more turnover than others.

Almost all of August Martin High School’s staffers are leaving: Only eight were re-hired, and 35 were not re-hired or chose not to apply. More than half of the teachers and staff at J.H.S. 80, Banana Kelly, and Fordham Leadership are also not returning.

John Adams High School, the largest of the six schools, will be more stable: While 66 staffers are not returning, 122 were re-hired.

During a similar process last year, most of the teachers at two of the city’s lowest performing schools did not return. At Brooklyn’s Boys and Girls High School, 74 percent of the teaching staff did not return. At Automotive High School, 63 percent left.

The re-hiring decisions are made by committees that include the principal, education department officials, and union representatives.

Still, the teachers union leader said Thursday that the strategy was all wrong.

“Mandated re-staffing of out-of-time schools misdiagnoses the real problem: these schools have been hemorrhaging teachers for years,” United Federation of Teachers President Michael Mulgrew said in a statement. The “out of time” schools “need good leadership, support and stability, not another spin of the revolving door.”