Why would you want to? If it is causing a problem with porn addiction, or you leave social situations to masterbate, then it is a problem, but if it is just your general run of the mill materbation I wouldn't worry about it. It is a natural healthy thing to do.
Just break down your habit like any other habit. Don't go complete cold turkey. Start off by reducing what you in half and then a month later another half and so on until you're down to once a month then to zero times a month.
It's all about self-control. You can also get a boyfriend and dedicate yourself to sex only and no masturbation in between.