As long as we are on this earth we will never be completely perfect, and sin will always be a problem to us. Only in heaven will we be free of its influence forever, for only then will we be like Christ. The Bible says, "When he appears, we shall be like him, for we shall see him as he is" (1 John 3:2).
I often compare sin to a chronic illness for that is what it is: a spiritual illness residing in our souls. A chronic illness may go into remission or not bother us as much as it once did but it is still there, lurking in our bodies and waiting for an opportunity to overcome us. The same is true of sin. The Apostle Paul's experience is the same as ours: "Not that I ... have already been made perfect" (Philippians 3:12).
Only one person was completely sinless, and that was Jesus Christ. He was born without sin, and in spite of Satan's fiercest efforts He never sinned. That is why He could be our Savior and take upon Himself all our sins. If we had to depend on our own righteousness, we could never be saved, for sin still clings to us. But Christ took all our sins upon Himself, and His righteousness was given to us.
I have always tried to follow the advice I heard a preacher say many years ago: Keep short accounts with God. When you know you have sinned, confess it to God immediately and seek His forgiveness. Then ask Him to help you avoid that sin in the future, and to live a life that more and more honors Christ.