You cannot give up anything you regard as desirable. To give up bad habits you must want to give it up and create new, more positive habits by eliminating your negative habits through substitution, by providing worthy, positive thoughts and actions to replace them.
Old habits are never destroyed for good, they are only submerged. Be aware of your thoughts and actions and keep dominant thoughts operating constructively upon new habits.