A pedestrian crosses the street in front of a Rite Aid store in Los Angeles.

Rite Aid said on Tuesday its chief executive officer would exit as part of a revamp of its leadership, and that it would slash about 400 corporate positions.

Camp Hill, Pennsylvania-based Rite Aid said the layoffs will affect more than 20 percent of corporate positions located at the company's headquarters and across field operations.

The company expects annual savings of about $55 million from the restructuring, of which about $42 million will be realized within fiscal year 2020.

It also expects to incur a one-time charge of about $38 million related to the restructuring.

John Standley, CEO since 2010, will remain in the post until the appointment of his successor, the company said.

It also said Chief Financial Officer Darren Karst and Chief Operating Officer Kermit Crawford would also leave the company.

The company named Chief Accounting Officer Matt Schroeder as the new CFO and Bryan Everett as the COO. Everett is currently the COO of Rite Aid Stores.

Almost the entire executive management team is moving on leaving the company in the hands of Rite Aid veterans who created the challenges and making it tough to recruit a new CEO, Evercore ISI analyst Ross Muken said in a note.

Rite Aid, which sold more than 1,900 stores to Walgreens Boots Alliance in 2017, has reported losses in three out of last four quarters.

The company and U.S. grocer Albertsons Cos. had terminated a $24 billion merger in August last year after Rite Aid's shareholders opposed the deal.

"All-in given the elevated leverage levels and likely declining profit line we think the outlook here is pretty dire. We see no real scenario long term whereby (the company) plays a meaningful role in the (drug) Supply Chain," Muken said.

Rite Aid's shares, which closed down about 2 percent on Tuesday, were up about 18 percent at 80 cents in extended trade.