There’s a difference between temptation and sin. Simply put, temptation is an invitation to sin, and sin is the acceptance of that invitation.
To help tell the difference, St. Francis de Sales offers a helpful illustration of a woman who is extended an indecent proposal.
The woman is unable to control the fact of the proposal, but she can control her reaction.
We will never be rid of temptations, but we should do everything we can to root out sin.