Lord Ganesha is said to have taken various avataaras to destroy various demons. These demons or no other than vices seen in humans.
He is said to have taken the VighnaRaaja Avtaara to destroy the demon, Maamaasura (the demon of attachment and desire). Here he is seen to ride the celestial serpent Sesha. He is also known as MooladharaGanapati.
In his Vikata Avtaara he destroyed the demon Kaamaasura (the demon of lust). In this avtaara his vehicle was the peacock. He is also known as Moreshwara or Mayureshwara.
As Lambodara riding on his mouse he destroyed Krodhaasura or the demon of anger.
He assumed the Gajaanana avtaara to destroy Lobhaasura, the demon of greed and avarice.
In his Mahodara avtaara he destroyed Mohaasura, the demon of infatuation and delusion.
He destroyed the demon of vanity Madaasura as Ekadanta.
Riding a lion as Vakratunda he destroyed the demon Mataasura, who personified envy and jealousy.
As Dhoomravarna he destroyed Abhimaanasura who is none other than ones egoistic pride.