It doesn't go away, not as such. Thought does not remember suffering very well, so you'll see the pills with rose tinted glasses and not take into account the whole movement involved in the action of using. You really just have to start observing your thoughts without acting on them, by observing you can understand.
I hesitate to suggest what your thoughts are, you are your our authority on that. In the case of opiate thoughts though I'd imagine the process is rather similar, in that thought is seeking security. Why is it seeking security? It is fearful. Why is it fearful? Because it does not want to lose the known. So security is with the known... This may be more relevant to an active addict thought process so I'll try again.
In your case of 45 days clean it's likely still a case of re-wiring. Thought functions best under order, whether that order be neurotic or rational. Your thoughts are probably still used to a neurotic kind of imposed order(pills) so you must work to give rational order (this just means getting involved with life on life's terms).
Second of all- are you doing any aftercare?
It isn't enough to simply stop using drugs and expect that life will return to normal. Aftercare is the number 1 thing that helps us stay clean. You need to identify the reasons you used in the first place, and spend a lot of time rewiring your brain to fill the void that you used to fill with drugs.
NA/AA, smart recovery, addictions counselling, CBT- these are some of the MANY options available to you.
Because I had reached my absolute bottom when I went cold turkey I realized I had to completely transform my life and work harder on myself than I ever had before in order to recover and heal. Honestly, because of this- I didn't ever experience cravings. I was fortunate in that I had complete family and friend support and none of these people were using. I never had to be exposed to the pills that had almost taken my life. After a few weeks clean I discovered a half full bottle of oxy that I'd missed in my purge (I had so many opiates in my house before detox I could have opened a pharmacy) My heart beat really fast and I immediately went to my parents (whom I was living with at the time while I recovered) and gave them the pills to dispose of. I never even considered taking one and just wanted them as far from me as possible. You MUST see the drugs as the poison that was destroying your life. Because that's what they are.
I had nearly 3 years of clean time when I was forced to go on opiates for a serious medical condition that I am waiting for surgery for. It was a terrible struggle for me because I was terrified of sliding backwards. I stepped up my support, put a plan in place, and am feeling at peace with it.
You have to work very hard friend. And most importantly, no matter how bad you want to, you CANNOT use. This is where aftercare and a sponsor is so helpful. When you're having the cravings you can go to a meeting, call a friend, and do something to distract yourself. Start filling your life with things OTHER than the drugs and the cravings will dissipate.
Be strong and don't do anything to compromise your hard earned clean time.
Proud of you...
Lu