At one point I felt coffee was making me too tense. I'd drink about 4 or 5 cups a day.
I made a game of cutting down (rather than stop.)
I allowed myself one cup a week, and looked for the best cup of coffee I could find. I researched coffee shops with a good reputation within about 30 miles of my house and I'd spend a nice half hour driving to see where I could find the best coffee. Actually I'd have one espresso and one other coffee drink.
All week I'd look forward to that one trip and after some weeks I didn't even feel like coffee during the week. Eventually I quit and that lasted about 5 or 6 years.
Now there's no compulsion it's just a pleasant habit and I do enjoy my coffee.