The past few years have been brutal on retailers, as inflation has not let up.

When inflation started creeping upward in 2021, many experts assumed it would be short-lived.

💵💰Don’t miss the move: Subscribe to TheStreet’s free daily newsletter💰💵

Consumers had gone on a spending spree after receiving stimulus funds, and supply just couldn’t keep up with demand. That drove prices upward, so much that inflation reached brutal levels in 2022.

Related: Iconic retail food brand files for Chapter 11 bankruptcy

But then something annoying happened. Inflation decided to linger. And it’s been lingering ever since.

In March, living costs on a whole were up 2.4% annually. That’s not a dreadful level. But it’s enough to make consumers rethink the way they spend their money.

Consumers have taken to cutting back on non-essential spending these past couple of years to cope with higher costs. And that’s been a big driver of retail store closures and bankruptcies.

Bankrupt drugstore chain’s leases go up for grabs.

Image source: Shutterstock

No retailer is immune to changing consumer habits

You’d think drugstores would have pretty decent staying power in the wake of reduced consumer spending.

It’s one thing for consumers to cut back on things like clothing and restaurant meals when money is tight.

Related: Bankrupt retailer’s leases scooped up by popular chain

But drugstores, by nature, stock their shelves with essential items. And many of those items are things the typical consumer can’t do without.

Drugstores commonly have pharmacies on site, too. And there’s perhaps no more essential a purchase than prescription medication.

Rite Aid couldn’t hang on

Despite being easily classified as an essential retailer, Rite Aid has struggled in recent years.

In early May, Rite Aid filed for bankruptcy for the second time in less than two years, citing ongoing financial and inventory-related challenges.

Rite Aid has faced stiff competition not only from rivals like CVS and Walgreens, but also big box stores like Walmart. Amazon’s foray into the pharmacy space didn’t help matters, either.

Related: Walmart makes drastic decision amid tariff threats

In fact, drugstores have faced increasing competition from online pharmacies, including Mark Cuban’s CostPlus Drug Company.

Bankruptcy wasn’t necessarily Rite Aid’s first choice. The company had been seeking a buyer earlier in the year, but was unable to find one.

Now, Rite Aid is putting close to its entire real estate portfolio up for grabs as part of the Chapter 11 process.

Rite Aid has almost 1,200 store leases and is looking to have bidders take over. The leases vary in terms of store size, from roughly 5,000 square feet for smaller stores to 50,000 square feet or more for larger ones.

At a time when retail space is hard to come by, there’s a good chance Rite Aid won’t have too difficult a time finding buyers to take over its leases. But there’s also been a recent influx of store leases entering the market as other retailers have gone the bankruptcy route themselves.

Not so long ago, niche retailer Party City put its store leases up for grabs, as did craft and fabrics chain Joann. Some of those leases are still being auctioned and do not seem to have been taken over.

More bankruptcies:

Popular restaurant and bar chain files for Chapter 11 bankruptcyPopular athletic shoe chain files for Chapter 11 bankruptcyAward-winning cosmetics brand files for Chapter 11 bankruptcy

The question, though, is whether the company can thrive in an age when customers can get a prescription from a doctor, instead of relying on weight-loss support programs to shed pounds.

But one thing Rite Aid’s leases have going for them is that a good number have below-market rents. Those leases in particular are likely to get scooped up quickly.

Plus, some of Rite Aid’s leases offer the benefit of being high-visibility locations that get a lot of traffic. Those leases, too, are likely to fly off the market.