Galatians 5:16 I say then: Walk in the Spirit, and you shall not fulfil the lust of the flesh.
Some people ask how it is possible to avoid sin after they have come to know Christ; they ask the question out of ignorance because they do not yet know the power of God!
I know, because I have been there. For a long time I would marvel at how others could avoid things or say no to temptation because I continued to trip up and fall.
It is only by walking with God and allowing Him to guide you that you will be able to avoid things. Yes you will still see those trappings but you may not want to go there.
Trust more in God and not your own weaknesses.