NEW YORK — The Yankees have given up on Jacoby Ellsbury, cutting the oft-injured outfielder with more than $26 million left in his $153 million, seven-year contract.

Ellsbury, who has not played since 2017, was released Wednesday to clear a 40-man roster spot as New York added seven players to protect them from next month’s Rule 5 draft.

Ellsbury is owed $26,285,714 by the Yankees in one of their biggest free agent mistakes: $21,142,857 for next season plus a $5 million buyout of a $21 million team option for 2021.

New York also cut frequently injured first baseman Greg Bird and left-hander Nestor Cortes Jr., designating the pair for assignment.

Outfielder Estevan Florial was added to the major league roster along with right-handers Deivi García, Luis Gil, Brooks Kriske, Luis Medina, Nick Nelson and Miguel Yajure.

Now 36, Ellsbury hit .264 with 39 homers, 198 RBIs and 102 stolen bases in 520 games in six seasons with the Yankees. He spent his first seven seasons with Boston and was in All-Star in 2011, and arrived in New York with a .284 career average, 104 homers, 512 RBIs and 343 steals for Boston.

Ellsbury injured an oblique muscle in his right side early during spring training in 2018, developed a bad back and had hip surgery on Aug. 6 to repair a torn labrum in his left hip. He experienced plantar fasciitis in his right foot during his rehab program before spring training this year.