New York Yankees center fielder Jacoby Ellsbury (22) lines out...

New York Yankees center fielder Jacoby Ellsbury (22) lines out to right during the first inning of the game at Yankee Stadium on Sunday, Aug. 14, 2016. Credit: Joseoh D. Sullivan

It may turn out that getting rid of Alex Rodriguez — though it was an awkward end to his Yankees playing career — was the easiest part of the team’s pivot to rebuilding with youth.

Now comes the hard part: deciding what they can do, if anything, with the remaining overpaid and underproducing veterans to make room for younger players.

While the Yankees haven’t committed to a total tear-down, general manager Brian Cashman probably will spend part of the offseason gauging the trade market for five veteran players with contracts that range from OK (Brett Gardner) to unfortunate (Chase Headley, CC Sabathia, Brian McCann) to what were they thinking? (Jacoby Ellsbury).

Remember, overpriced players with bad contracts can be traded. Teams get creative and share the financial misery.

For example, Matt Kemp has been traded twice in an 18-month span, the last time by the Padres to the Braves for $62.5-million bust Hector Olivera, who promptly was waived.

James Shields was traded from San Diego to the White Sox and has a 7.34 ERA for his new team. He also has two more guaranteed years on his contract at $42 million. The Padres are paying $22 million of that.

If they can pull off a trade, the Yankees will not be getting back the kind of primo young talent they obtained when they dealt Aroldis Chapman, Andrew Miller, Carlos Beltran and Ivan Nova before the Aug. 1 non-waiver trade deadline.

To trade any of the five, with the possible exception of Gardner, the Yankees will have to either take back a bad contract or eat some of the money. The Yankees also might be hamstrung by their decisions to give out no-trade clauses like candy during their most recent, ill-fated spending sprees.

Heading into 2017, the Yankees have only seven players with guaranteed contracts. One of them, Masahiro Tanaka, can opt out of his seven-year, $155-million contract after 2017. The tenuous condition of his elbow makes next season an interesting one for the righthander and the team. But Tanaka, who has a no-trade clause, is not getting traded.

The Yankees also have Starlin Castro signed through 2019 with a 2020 option and Tyler Clippard signed through the end of 2017. Neither is a candidate to be traded.

The players whom the Yankees might regret having on their roster next year but might be powerless to send away (contract information courtesy Baseballprospectus.com):

CC Sabathia

Contract status: Signed through end of this season with a vesting option for 2017 at $25 million.

No-trade clause: Yes

Skinny: Unless Sabathia suffers a serious shoulder injury before the end of the season, his $25-million option will vest. That’s not what you want to pay for a fifth starter, but Sabathia has value as a staff mentor.

Brian McCann

Contract status: Signed through 2018 at $17 million per year with an option for 2019 at $15 million that becomes a player option if McCann meets certain playing time criteria in 2017-18.

No-trade clause: Yes

Skinny: McCann has lost his No. 1 catcher job to rookie Gary Sanchez. Owner Hal Steinbrenner said last week that the Yankees will “cross that bridge in the offseason when we come to it” in terms of McCann’s future. He’s expensive, but McCann has value and likely will agree to be dealt in order to regain a starting job. The Yankees will have to eat some of the contract.

Chase Headley

Contract status: Signed through 2018 at $13 million per year.

No-trade clause: No, but is paid $1 million if traded.

Skinny: One of the nicest guys in baseball, but a middle-of-the-pack producer at third base. The Yankees would have gotten similar production for a fraction of the cost by holding on to Yangervis Solarte, for whom Headley was acquired. Re-signing Headley for four years and $52 million was a head-scratcher. Did we mention he’s a nice guy?

Brett Gardner

Contract status: Signed through 2018 at $12 million in 2017 and $11 million in 2018 with a club option for 2019 at $12.5 million or a $2-million buyout

No-trade clause: No

Skinny: Gardner has no say on whether he stays or goes, but the window for getting a valued return may have closed as he ages and keeps getting injured. Gardner can play centerfield, which the Yankees don’t need because they probably are going to be stuck with Ellsbury.

Jacoby Ellsbury

Contract status: Signed through 2020 at $21.1 million per year with a $21-million club option or $5-million buyout for 2021

No-trade clause: Yes

Skinny: It seemed like a bad contract at the time. It was. The scary thought is that when the youth movement reaches its fruition in 2019 or 2020, Ellsbury may be the only big-money veteran still around. He hasn’t shown the ability to be an impact player or a clubhouse leader. Cashman should win Executive of the Year if he finds a taker for Ellsbury. Don’t bet on it.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME