The New York Yankees are cutting StubHub.

The team is dropping the ticket exchange, which allows fans to buy and sell tickets at market rates, as their official re-seller in favor of a deal with Ticketmaster.

As The Post first reported, the Yankees are miffed fans can buy tickets for a couple of bucks right up until game time because StubHub has refused to put a price floor for transactions on its site.

Sources said that Ticketmaster will likely agree to set price floors on some ticket sales and stop resales before game time.

The Yanks, along with the Los Angeles Angels, are opting out of a new five-year deal between Major League Baseball and StubHub that allows it to continue as the official secondary ticket market for the league. The Yanks and MLB declined to comment.

Although the Yankees cannot ban ticket buyers outright from using StubHub to resell tickets, they can make it far less convenient.

With the StubHub link removed from Yankees.com, buyers will no longer be able to print StubHub Yankees tickets from home. The seller will have to send the tickets or give them to the buyer in person, said one source.

The Yanks blame StubHub for some of their gate woes. One criticism is that many tickets go unused because fans can grab them for a fraction of the price. Another is that StubHub charges higher commissions on ticket sales.

Attendance at Yankee Stadium has fallen in the two years it has been with StubHub, down 3 percent last year, to 43,733 — despite winning the division — and 6 percent over two seasons.

That still, however, was second-highest in the league, and well above the Mets, who averaged 28,035.

A source close to the situation believes the Yankees might lift attendance by 5,000 a game by dumping StubHub. If the average fan pays $53 a ticket, that would amount to $21.5 million for the season.

This year the Yanks were so concerned that StubHub was hurting ticket sales that the team placed fliers in the seats of those who bought StubHub tickets, suggesting that next time they could save fees by purchasing unsold tickets from Yankees.com, according to one StubHub buyer.

Not everyone blames StubHub for falling attendance. Ticket reseller Joe De Laura says the Yanks are charging too much. He predicts resellers will buy fewer season tickets now that the Yanks are ditching StubHub.

“Taking out the free market will cripple their business. A ton of guys are going to pull out,” he said. “StubHub is good for the Yankees, not bad, because it puts people in the seats for the less desireable games.”