It might help to look at and for the other way - stop relying on defending against temptations, and seek to go on the offensive: look seriously at the beauty of virtue, the glory of purity, the power of holiness. Don't just hide from the devil - seek God. He created you; in Him is LIFE - your LIFE.
The advice above is good and effective for those in "step 2" on the path to holiness. It cannot help for any who are still working on "step 1". Step one is contained in
the Lord's Prayer, the "Our Father", when we pray:
"Forgive us our trespasses as we forgive those who trespass against us." (Mt 6:12)
Jesus comments on this step directly, specifically, because it is essential:
Mt 6:14 For if you forgive men their trespasses, your heavenly Father also will forgive you;
Mt 6:15 but if you do not forgive men their trespasses, neither will your Father forgive your trespasses.
This
conditional requirement of His is Truth, from and of God, and must not be ignored or presumed upon. If we want the forgiveness of God for the ways we have offended, disrespected, ignored and hurt Him, we
must forgive those who have offended, disrespected, ignored and hurt us. God who IS truth tells us this. This is "step one", and many have found and rejoiced in this truth. If we want and ask for His mercy, we must become merciful. This is His condition, because it is a step necessary for our entry into His Kingdom - and our salvation, our
vocation.
"Step 2" presumes this "step 1", and is the completion of it. If anyone seeks to understand and verify this, ponder it for a while; I believe it will reveal itself in time.