This week, J.C. Penney released details of its plans to shutter 138 stores (out of 1,014) and to cut 5,000 retail jobs.

This is part of the ongoing reinvention of a company that seemed to be on the verge of collapse just a few years ago. J.C. Penney says physical stores remain vital to its business, allowing customers to order online and pick up purchases at a nearby store. But what’s clear is that the company, now profitable again, is going to make do with fewer physical locations.

And this speaks to a broader trend. Despite the success of Apple’s brick-and-mortar locations or Amazon’s experimental stores, the fact remains that physical retail is in the midst of a devastating shakeout across the U.S. It seems ecommerce, which many predicted was going to kill brick-and-mortar retail almost a decade ago, is having a delayed but devastating impact.

The consequences of that shift can not be understated. Local communities and governments depend on the sales taxes from physical stores and take a hit when those stores close and consumers move their purchases online. And in the case of large anchor tenants like a J.C. Penneys, abandoning a mall location can start a chain reaction that kills traffic to a shopping center, which in turn crushes other smaller businesses located there.

Ana Smith, a spokesperson for the National Retail Federation, said the industry is doing what it can to adapt to the reality of shifts in technology and shopping behavior.

“The retail industry continues to evolve based on consumer preferences and shopping patterns,” she said. “Retailers are resizing and modifying their businesses by implementing strategies to become more efficient and profitable in the long run. From relocating stores and acquiring new companies to starting new concept stores, these are just some of the examples of how retailers are adjusting their business plans to make sure they continue to meet consumers’ demand in a highly competitive environment.”

J.C. Penneys is far from alone. Just yesterday, Sears disclosed to investors that it had serious doubts it could continue as a going concern. Sears was already in the process of closing 150 of its stores. Macy’s is closing 100 stores. Foot Locker has said it plans to close 100 stores this year. Office Depot reported that it shuttered 123 stores last year, and it has announced plans to close at least 75 more this year, with rival Staples just about matching that pace. Pier One wants to close 100 stores by 2019.

And really, the list is endless, including CVS and The Limited (which has filed for bankruptcy and closed it 250 stores).

Real Estate research firm CoStar projected that retailers will have to close about 1 billion square feet of retail space, or about 10 percent of the existing space, in the U.S. this year for one simple reason: They are simply not generating the kind of in-store sales to justify the cost of keeping them open.

Said Suzanne Mulvee, director of U.S. retail research for CoStar Portfolio Strategy, in the report: “It all comes down to productivity. Retailers on average are generating fewer sales per square foot than they did during the decade leading up to the recession.”

What was already a miserable environment for physical retail got worse over the holidays. Overall, the NRF reported that holiday retail sales increased 4 percent over 2015 to $658.3 billion. That included $122.9 billion in what the NRF likes to call “non-store sales.” Those online sales grew more than the NRF projection of 10 percent.

Indeed, the NRF reported that sales at clothing and accessories stores, general merchandise stores, electronics and appliances stores, and department stores all decreased. For a company like J.C. Penny, that made the choice clear: Close under-performing stores and try to continue to spruce up the remaining stores with higher-end experiences.

In an earnings call with analysts last month, J.C Penney chairman and CEO Marvin Ellison said:

Our decision to close approximately 130 to 140 stores will allow us to raise the overall brand standard of JCPenney and allocate capital more efficiently to a smaller base of stores. This will also allow us to implement our growth initiatives in a larger percent of our stores.

That includes adding showrooms for more luxury items and expanding the online order/in-store pickup program. But it remains to be seen whether this “omni-channel” strategy can really delay what increasingly feels inevitable.

Decades ago, the arrival of malls on the edges of cities helped turn downtowns in virtual ghost towns. Now these suburban and rural retail neighborhoods could be in line for the same fate, with these communities left wondering what will fill the economic void that remains.