Outside powers in the West stirred up and blessed the rebellion against Gaddafi. Through NATO and the UN, they are now aiding these same rebels.
They want to get rid of Gaddafi. They want him removed from power. This article explains why they want this.
The basic reason is simple. Gaddafi confronts their power. He confronts the status quo of the Empire. He demands greater power for Africa and the African Union. He demands greater power for smaller countries in the United Nations. Gaddafi calls for investigations of past wars. He is calling for a new way forward that reduces the powers of any one or a few countries to dominate the world.
For the sake of appearances, the Western allies are fighting the war in Libya within self-chosen limits. They need to maintain the facade of a legitimate and neutral NATO that is acting with UN approval. These organizations are under their control. They calculate that they can get rid of Gaddafi within those limits, while still not appearing to be the aggressors against him that they are.