The mind is the center of attraction where thoughts are processed into actions.
It takes a deliberate effort to renew the mind.
Let me give this analogy to describe how best to renew your mind.
The mind is like a cup full of dirty water and you need to do away with the dirty water, but you can not turn it upside down. Now remember that sand is heavier than water and once you gradually put the sand in the cup, it gradually, displaces the content of the cup.
The time it takes to displace the water depends amount of dirty water in the cup.
So also is the heart, the only thing that can displace dirty or negative thought is the word of God. Keep pouring the word of God in your heart by reading and mediating on the word.
Know this for sure, there is no fast rule to overcoming dirty thoughts other than filling your heart with the word of God. That is why you need to be loaded with the word of God.
The amount of time it takes, depends on the amount of dirty stuff in your heart. You didn’t accumulate the dirty stuff one day, so thinking that you will eradicate them one day will take a miracle.
The thought will still flash to your mind, but you cover or displace with the word of God. That is why you can’t afford to be empty at this point in time.
You also need to daily guard your heart for out of it are the issues of life.
If you watch a movie for 2 hours and there is 20 seconds of obscene or pornographic scene, believe you me years to come, you must have forgotten about the whole story, but the 20sec scene will remain in your memory, this is because the mind tend to hold on to bad images than the good. This is one of the reasons why you need to diligently guard your heart and be careful what you let in.
Some stuffs does not come out with the ease at which they enter.
You have the right to be motivated.