Ghadaffi's relations with the Europeans had actually improved substantially in the run-up to the civil war. Even the UK was moving to normalise relationships, which was a pretty big deal given the bombing of the plane over Lockerbie.
It was the Arab Spring and internal strife which kicked off Ghadaffi's downfall with the events at Benghazi getting the international community - lead by France, ISTR involved.
The UN kicked Libya off the Human Rights Commission, following a report by Amnesty documenting warcrimes on the government and rebel sides and it all degenerated into a nasty civil war. I don't think it is correct to say that he was "ousted" by Western forces in any particularly meaningful way.