For a month UN/NATO gave Gaddafi absolute freedom to apply maximum violence to suppress the rebels. Meanwhile they kept buying his oil and if he had been successful all would have been forgiven they they would have kept buying the oil from him.
They made overtures to the rebels and those overtures were rejected. They landed British SAS forces in a rebel area and the rebels arrested them. That probably delayed NATO air strikes by more than a week.
Most of all NATO wants oil from Libya and they can get that from Gaddafi or the rebels but they can't get that without stability. NATO did not act until they had determined Gaddafi would not prevail quickly. His promise to do to Benhgazi what he had just done to Ajdabiya, saying "Libya will clean house to house if the protesters do not surrender", meant that as many as a hundred thousand civilians could have been slaughtered and that whole oil producing area would be in great turmoil for a long time. So they finally acted.
Once NATO started bombing they had already determined that Gaddafi must go and they have every intention of removing him. But they still have not received the concessions they want from the rebels. That's why they have backed off. That is why they have been slow to resumed air strikes to stop Gaddafi's murderous bombardment of Misratah. They are using Gaddafi to discipline the rebels in an attempt to force them to beg for NATO's support on NATO's terms.