Generally, they distribute the shares out to their own investors over a period of time (often 8 quarters, as a base case) after an IPO. They often try to sell shares in Secondary Offerings, too.
But sometimes, they hold longer. They may need permission from their LPs to do so, but sometimes they hold much longer than 24 months after the IPO. If they think they have a true winner that will keep running.
But a rough rule is to try, one way or another, to distribute the shares to their own investors within about 24 months after IPO if possible.