One can never get rid of temptation while they live in their physical, fleshly bodies. Only when we die (or are raptured), can we ever be rid of sin entirely and for eternity.
You can try to remove yourself from tempting situations, which is a good thing. Did Joseph not flee Potiphar's wife when she came onto him? He didn't stay there and chat with her, knowing he'd have to fight his sinful flesh's desires to lay with her, no, he RAN from her. When she grabbed his coat, he left the coat there and ran. He still got thrown in prison, but that is preferable to being executed outright (which is what would have happened had he laid with her).
You could make the decision to NOT go to the bar, because if you're in the bar, you're probably going to end up looking at women and drinking (which opens a whole pandora's box).
However, you cannot avoid ALL temptation.
Temptation is a mixture of our fleshly body (something you cannot live without) and demons whispering things into our ears. I know a lot of Christians don't believe that demons are everywhere and that they constantly whisper things into our ears that only our subconscious/spirit hears, but they are there, and they do very much do that.
Ever been sitting at your computer, doing absolutely nothing sinful and then out of the blue, filthy sexual images come to mind? That's probably a demon and it is sitting on your shoulder, whispering in your ear, trying to get you to sin.
When you get a sinful thought, Paul tells us to FLEE temptation. Maybe not literally get up and run, but immediately repent for such thoughts. "Lord, I repent for that thought that just went through my mind... please, help me cleanse my mind of such evil!"
Christ was tempted in the wilderness three times over 40 days. There is nothing wrong with temptation, if you resist it, and turn away from it and refuse to give in to it. Christ lived a sinless life and was perfect and without spot, so much so that He was able to bear all of humanity's sin, past, present, and future on the Cross and purchased Redemption for everybody.
If Christ was sinless, then that means that Temptation can't possibly be sin, or anything "wrong" with you. What you do in response to such temptation, well, THAT is the question.
Do you give into it? If so, you've sinned. Repent, and ask for forgiveness.
If you don't give into it, rejoice but be on your guard. Do not allow pride to grow within you. Don't think of yourself as invincible because you've resisted temptation enough times, otherwise you WILL fall the moment He pulls His hand back and allows you to fall to keep you humble.
Remember -- we can only resist Temptation because He gives us the Grace that we need to do so. Without Him and His Grace, we are wholly and utterly evil inside. Our "Good Deeds" are as filthy rags to Him if we don't have His Grace. We are nothing without Him. Without Him, we can do nothing good whatsoever.