Earlier this year, Ford Motor (NYSE:F) announced big changes to its North American product portfolio. Ford plans to discontinue all of its traditional passenger car models in its home market over the next couple of years, reacting to a massive shift in consumer tastes toward crossovers, SUVs, and trucks.

On Monday, General Motors (NYSE:GM) announced a similarly aggressive restructuring plan. GM plans to idle numerous factories and make deep cuts to its salaried workforce. It will also discontinue a handful of key products in the North American market. Making these tough decisions now will dramatically improve free cash flow over the next two years while ensuring that the company can remain profitable through a recession.

What the General is doing

Several weeks ago, General Motors offered buyouts to about 18,000 of its salaried workers. About 2,250 accepted the offer. The cuts that GM announced on Monday represent a significant increase to the scope of this cost-cutting initiative.

As my Foolish colleague John Rosevear described, GM will idle five underutilized factories in the U.S. and Canada by the end of 2019. (Their long-term future will be determined after negotiations with GM's labor unions.) Together, the five sites employ about 6,300 workers. GM will also reduce its salaried workforce in North America by 15%, or 8,100 positions, including a 25% cut to its executive ranks. Outside of North America, GM plans to close two factories next year.

Most of the capacity of the North American factories slated to be closed is devoted to passenger car production. In conjunction with halting production at these facilities, GM will stop building the Chevy Cruze, Chevy Impala, Chevy Volt, Cadillac CT6, Cadillac XTS, and Buick LaCrosse models for the North American market next year.

A gray Chevy Cruze parked in front of a building.

The Chevy Cruze will be discontinued in North America next year. Image source: General Motors.

GM expects these moves to reduce annual costs by $4.5 billion while streamlining decision-making. (Some of the savings will be reinvested in GM's electric vehicle and autonomous vehicle efforts.) Annual capital expenditure requirements will also decline by $1.5 billion, bringing the total cash savings to $6 billion per year. In the near term, GM will incur up to $3.8 billion of one-time charges related to the restructuring, including up to $2 billion of cash costs.

There was no real alternative

Not surprisingly, politicians have almost universally condemned GM's planned job cuts. But the company didn't have a better option, as demand for these factories' products has dried up.

Indeed, as recently as 2013 and 2014, combined deliveries of the Chevy Cruze, Impala, and Volt models totaled roughly 430,000 units annually in the U.S. By contrast, through the first three quarters of 2018, those three models accounted for only 166,857 of domestic deliveries. Depending on how the fourth quarter shakes out, it's a safe bet that combined sales of the Cruze, Impala, and Volt will be down 45% to 50% compared with the 2013-to-2014 period.

As fuel prices fell beginning in 2014, consumer tastes quickly shifted toward larger vehicles. Meanwhile, steel and aluminum tariffs have driven up costs, making it even harder to sell cars at a profit. These trends forced Ford's hand earlier this year.

Unlike its crosstown rival, GM plans to keep some traditional sedans in its lineup for now. But it's clear that such vehicles will be a small part of its portfolio going forward. General Motors probably hopes that cutting some models will push buyers toward those that remain -- most notably the Chevy Malibu -- leading to higher capacity utilization and stronger profitability.

A much-needed tailwind for GM stock

General Motors' third-quarter earnings report showed that the company is in better shape than many investors had feared. Strong pricing discipline is allowing GM to remain quite profitable even though sales have been under pressure.

That said, the General hadn't yet felt the full effect of a deep sales slump in China last quarter. Furthermore, the U.S. auto cycle peaked a couple of years ago, and GM has to be prepared for further sales declines in its most important market over the next few years. These were clear obstacles to earnings and cash flow growth at General Motors.

GM's new cost-cutting plan is a game changer. By slashing overhead costs, moderating capital investments, eliminating poor-selling models, and closing underutilized plants, General Motors could potentially boost annual free cash flow by $6 billion by 2020. For comparison, the company expects to produce about $4 billion of free cash flow this year.

Even if the net increase in free cash flow is just $4 billion due to slowing sales in key markets, that would put free cash flow at $8 billion. The incremental cash flow will also make it less likely that GM would burn cash in a recession. Considering that GM has a market cap of just $53 billion, there's plenty of upside for investors if the company can successfully execute its restructuring plans.

Adam Levine-Weinberg owns shares of Ford and General Motors. The Motley Fool recommends Ford. The Motley Fool has a disclosure policy.