The situation in Libya can go either way right now. There exists a window of opportunity here for things to go a peaceful route. What is needed is a firm grasp of leadership, almost dictatorship for the very short term.
There needs to be a strong hold on disarmament as fast as possible. In tandem there needs to be an influx of cleaning up of unexploded ordinance, clear the rubble of destroyed buildings and other infrastructure. The world community needs to step in and help with maintaining the rule of law while the transitional government works to hold elections.
There is a large possibility that gangs will infiltrate the police and government right now. This is the largest piece of concern that has to be dealt with. As the country rebuilds its self the rule of law has to be kept intact if not improved. Trust has to be built for peace to take root and that trust begins with enforcing the laws of the country as fairly and as transparent as possible.
NATO forces have taken on the role so it should stay until the job is finished; or it can take the G W Bush saying to cut and run.
I know this is a very simple outline to a complex and lengthy situation. However this outline is the crux of what needs to take place in the coming months.