Here is what I found on Uni Watch.
Any big leaguer who wants to change uniform numbers without switching teams better give eight months’ notice unless he’s willing to buy warehouses full of his overstocked jerseys. …
Players must tell the commissioner’s office by July 31 of the preceding year if they want a new jersey. That is, unless ‘the player (or someone on his behalf) purchases the existing finished goods inventory of apparel containing the player’s jersey number.’ As in, every replica jersey, jacket, T-shirt, mug and anything else with a number that’s anywhere in stock.