How to conquer a vice through a virtue?

How to conquer a vice through a virtue?