There are medicines that your doctor may prescribe which can help prevent your cravings for alcohol or other medicines(eg disulfiram), which help deter you from drinking by giving you unpleasant symptoms, eg vomiting and a headache, if you drink alcohol.
Attribution: BUPA