Thank you, it is actually something I have been watching for decades.
Way back in the 1980s this was well known. Gaddafi and his lavish drinking parties, then the moment the US attacked him in response for his bombing of US servicemembers in West Germany suddenly wearing traditional garb (instead of his almost iconic military uniform) and suddenly crying to everybody how devout he was. That was something he would do over and over again, and ironically I do believe later in life he did change, to a degree.
The above is pretty much how he was ever seen to the world. There are actually few photographs after he took power until around 1991 where he was not in uniform. It was only after the US responded that he was ever really seen in secular or religious garb.
However, that actually started to change in around 1990. After getting "spanked" by the US and other nations many times, he watched as Iraq invaded and annexed Kuwait and that did seem to offend him. As he was a huge believer in "Pan-Arabic Unity" and was upset that one "Arab Nation" would attack another like that and so brutally. And ironically, he was one of the loudest to speak up in protest against that. And that was also at the time he started to kick out the terrorist groups and most fled to Iraq. Abi Nidal being one of them. His ANO was sponsored by Libya for decades, and had a lot of training camps there. But once Libya kicked them out, they went to Iraq. Where I still laugh as Abu himself died by "suicide", shooting himself in the head multiple times while living in a villa provided by Saddam.
I actually do believe he changed to a degree after 1990. By that time he was in his 50s, and was likely starting to rethink his life. He became much less antagonistic and seemed to actually start to at least try and do some good things. But his problem was that he was still brutal in his own country, and eventually it was time to "pay the piper". I think I first became aware of Libya as a country and the leadership back in 1978 when the "First Brother" was caught working as an undercover agent for Libya. It is one of the countries I have been watching closely for over 40 years.