New Yorkers getting their fill of booze for St. Patrick’s Day will have to do so before getting on a train to and from the city, according to the MTA.

Metro-North and Long Island Rail Road trains and platforms will be an alcohol-free zone on Thursday “in an effort to maintain orderly travel for customers,” the agency announced.

The ban will take effect at 12:01 a.m. Thursday until 5 a.m. Friday. And any booze — open or closed — found by MTA police on trains, platforms, or in stations will be confiscated.

The agency will also close all bar carts at Grand Central and Penn Station for the day.

The agency will, however, be adding extra trains to accommodate the tipsy crowd.

An extra 16 trains have been scheduled on the LIRR — six headed toward the city in the morning and 10 headed back to Long Island in the afternoon.

Metro-North customers will also see more trains. An extra train will depart from Poughkeepsie at 8:23 a.m. and stop at New Hamburg and Beacon, before running express to Harlem-125th Street and Grand Central. There will be standby trains ready to go, the agency said, as the demand warrants.

Northbound trains will also be prepared to run on the Hudson Line from Grand Central as needed, according to the agency.