Sidi wa sanadi Hazrat Moulana Mohammad Taqi Usmani sahib db instructed a mureed:
Whenever the desire to sin arises, ask Allah swt’s refuge and pray for being saved from committing it.
After being successful in it by Allah swt’s tawfeeq(benevolence) be excessively thankful to Allah swt and continue to have firm determination (for abandoing sins). InshaAllah, with time the intensity of these desires will decrease gradually (for the one who is systemically & methodological involved in his islah).
Islahi-khutoot