Your favorite retail pharmacy store may soon be no more. In a Tuesday announcement, Walgreens‘ parent company said that the company would shutter 1,200 underperforming locations over the coming three years as it attempts to regain profitability.

In recent years, Walgreens has struggled to sustain consumer spending, and faltered in the face of lower prescription payouts. The so-called “footprint optimization program” is part of a broader one billion dollar cost-cutting operation that will also involve the sale of more store-branded products, and a re-negotiation of insurance payer reimbursement models. The company has suggested that concerns over inflation and reduced spending in lower-income shoppers could be contributing to their lagging performance.

“In fiscal 2025, we are focusing on stabilizing the retail pharmacy by optimizing our footprint, controlling operating costs, improving cash flow, and continuing to address reimbursement models to support dispensing margins and preserve patient access for the future,” said the company’s CEO, Tim Wentworth, in an October 15 statement to investors. “Fiscal 2025 will be an important rebasing year as we advance our strategy to drive value creation. This turnaround will take time, but we are confident it will yield significant financial and consumer benefits over the long term.”

The store closures—approximately 500 in the coming fiscal year—are expected to immediately increase earnings per share, the statement notes. This is of pressing concern, since stock in the company has plummeted 65% this year, making it the worst performer on the S&P 500 index, according to Reuters.

In the most recent quarter, the company reported a net loss of $3 billion. This was “primarily driven by a higher operating loss, a $2.3 billion non-cash charge for valuation allowance on deferred tax assets primarily related to opioid liabilities recognized in prior periods, and a non-cash impairment charge related to equity investment in China,” the investor statement explains.

However, shares in the company spiked 12.3% to $10.11 this morning as a result of the company’s announcement, indicating investor confidence in the decision to close stores. Wentworth emphasized in an earnings call on Tuesday that the closures would allow the company to “respond more dynamically to shifts in consumer behavior and buying preferences.”

Once Walgreens closes those 1,200 locations, 6,800 will remain nationwide—6,000 of which are considered profitable. Though they have not announced where the closures will take place, the company has said that it will attempt to rehire employees of closed stores at other retail locations.

Walgreens is owned by the Walgreens Boots Alliance, which also owns the UK’s prominent Boots pharmacies and has owned the iconic New York City pharmacy chain Duane Reade since 2010.

“While the decision to close the store is never an easy one, we feel confident in our ability to continue to serve our customers,” the CEO said. “We intend to follow our historic practice to redeploy the majority of the workforce in those stores that we closed.”

For daily wellness updates, subscribe to The Healthy by Reader’s Digest newsletter and follow The Healthy on Facebook and Instagram. Keep reading: