[quote="Tantum_ergo, post:2, topic:286853"]
If you weren't aware at the time that what you did was sinful, then you didn't sin by not confessing then.
My personal opinion? I would talk to your priest saying, "Father, before I became aware that X was sinful, I did it about X years ago and not knowing it was sinful, did not confess it, but now that I'm aware, I would like to express contrition for my sin and for not being more aware back then."
Father doesn't have to absolve you (since you didn't know you were doing wrong), but he can note your contrition AND he can probably give you some helpful advice as your confessor. It's good for our priests to know some of the ways in which we have sinned so that he can help us to guard against backsliding or against similar sins. Again, just personal opinion here.
I think op is remembering not realizing something he used to do was a sin
I may be wrong but Ive been to confession a few times, then I remembered a specific thing I did that was bad, and clearly a sin, but I did it years ago, and ive been to confession since but not for that sin... and I completely forgot to recently -
and in that case I also wonder like the OP what the protocol is