I gently titrated down by replacing coffee with a pre-workout drink (powder mixed in water). This allowed me to tightly control my caffeine intake and reduce it gently every few days until it was almost zero. I have been off of caffeine entirely for almost 15 months now. It has really improved my sleep.