Here's my technique: decrease amount of coffee by 1/2 cup a day until you're down to 1 cup a day.
Then switch to black tea and have as much as you want. Every time you feel a headache
coming on, have a cup. Then decrease black tea gradually to 1 cup a day. Then switch to green tea and repeat the process. When you are down to 1 cup a day, it should be easy to stop. Give yourself 2 weeks.