Libyan population of 6.5 million comprises of various tribes. Col Gaddafi comes from a smaller tribe - Gaddafa, based in Sirte. Warfalla is by far the largest tribe with nearly one million members. Warfalla has been opposed to Gaddafi for quite some time and it is the Warfalla who have captured Ben Ghazi.
Gaddafi cleverly included various tribes into the armed forces to keep them happy. However, after the last uprising, he excluded the Warfalla from some of the military functions and from the air force.
The armed forces have various components including the revolutionary guards, which are thought to be loyal to Gaddafi. The rest of the armed forces do not have enough power to overthrow Gaddafi and start a civilian transition like currently under way in Egypt.
The biggest problem in post Gaddafi Libya will be to unite all the tribes. So far there is no clear leader who can command the respect of all tribes (including the Gaddafa tribe) to govern effectively after Gaddafi.
The real danger is that Libya will splinter into small tribal fiefdoms, all fighting over oil revenues. Gaddafi's departure is only a question of time, but post Gaddafi picture does not look very pretty.