I John 1:9 gives us a tremendous and really marvelous promise, and it is that when we confess our sins, our heavenly Father is willing and able to forgive our sins, and in that forgiveness comes a cleansing from all unrighteousness.
However, the catch here is our confessing our sins. For to be able to really and truly confess our sins, we must also be willing to repent of our sins. True confession is always accompanied by appropriate repentance. And for us to truly repent of our sins we must be willing and wanting to turn away from that sin, to forsake that sin, and to put ourselves as far away as possible from that sin.
Confession without true repentance is merely saying to God, "Oops, I messed up, please clean up my mess while I go about making it again." Confession without true repentance is wanting to have the consequences of our sin done away with, without wanting to do away with the sin itself.
True confession is seeing your sin, thinking about your sin, and talking about your sin the same way God would. It is having the mind of God concerning your sin, and saying the same thing about it that God would. In fact, until we truly see our sin as God sees it, we will never have victory over it.
The promise of forgiveness and cleansing in I John 1:9 is true, as is every promise of God. Let us not make light of this promise, but let us come to our God in reverence, awe, and true repentance to receive the blessing of being clean before Him. For in our salvation we have been made clean, all we must do now is wash what is dirty through repentance and confession.