Albiet there are other things involved in such an action such as Rituals, Ceremonies, Confessions, Sacrifices, and yada yada.
There's 3 ways to rid one of a demon that i can recall off top of my head - applying only to those of Ahriman/Lucifer/Satan.
1. Your soul being strong enough to be able to force the demon out - demons mainly seek 2 things once it gets to the opposite side of a master-thrall relationship. To cause catastrophy in the ex-master/preys life, and to whittle down the spirit until it is suitable to become enthralled/absorbed so the demon may possess the host. Its sort of Ad-Nauseum in a sense because with a physical body the demon will seek more souls, stronger souls… Very few people can just 'will' themselves to such a strength to combat this or to enthrall a demon, and trying may even cause your situation to worsen and bring you harm!
1/2 cont….