Jerking the penis

Q: How can a person get rid of the habit of jerking his penis?

A: All Praise is due to Allah Alone and peace and blessings be upon His Messenger, his family, and Companions. To commence: It is by being aware of the harms and bad effects of such a habit. Jerking the penis causes enuresis and the exposure of one's body and clothes to impurities. This should be a deterring reason for giving up this bad habit.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.