It is better for one to express specific sins he committed, as doing so deepens regret and strengthens repentance. This is the opinion of R. Yehuda b. Bava in the Gemara. He bases it on the confession of Moshe Rabbeinu following the sin of the Golden Calf: “Moshe went back to the Lord and said, ‘Alas, this people is guilty of a great sin in making for themselves a god of gold’” (Shemot 32:31). At the same time, specifying one’s sins, on some level, impinges on the honor of heaven, for the goal of repentance is to minimize the importance of sins, and speaking about sins grants them significance. Additionally, shame over one’s sins is fundamental to repentance, as the Sages say, “If one sins and is ashamed of it, he is forgiven for all his sins” (Berakhot 12b). One who specifies his sins may seem as though he is not ashamed of them. Thus, R. Akiva maintains that one who confesses need not specify his sins, as it says, “Happy is he whose transgression is forgiven, whose sin is covered over” (Tehilim 32:1).
In practice, one can fulfill his obligation to confess without specifying his sins. He can simply declare, “I have sinned, I have wronged, I have rebelled.” Certainly, then, reciting Ashamnu fulfills the obligation. One who knows that specifying his sins will deepen his repentance should specify them silently. For example, if he ate non-kosher food, he should say, “I have eaten non-kosher food” (SA 607:2; Vilna Gaon ad loc.; SHT ad loc. 3).
There is a disagreement among the Sages as to whether one who confessed his sins the previous Yom Kippur should confess the same sins again (Yoma 86b). Some say, “Of him, Scripture says, ‘As a dog returns to his vomit, so a dullard repeats his folly’ (Mishlei 26:11).” In contrast, R. Eliezer b. Yaakov says, “He is certainly praiseworthy, as we read, ‘For I recognize my transgressions and am ever conscious of my sin’ (Tehilim 51:5).” Shulḥan Arukh rules that one may confess again for sins to which he confessed the previous year (SA 607:4).
Perhaps we can suggest a guideline: If one feels that his repentance is incomplete, and that he has not yet managed to erase the sin from his heart completely, it is better for him to confess again. But if one feels that his repentance is complete and the sin is erased from his heart, it is not appropriate to confess, as doing so displays a lack of faith in the power of repentance. Sometimes a person repents completely and erases a sin from his heart, but a few years later suddenly thinks about it again and is distressed by it. This happens because his repentance was sufficient for his former spiritual stature; no trace of the sin was discernible. However, after he attains a greater, more illuminated spiritual stature, his previous repentance is no longer sufficient to cleanse him of any trace of sin. Therefore, he must confess again to erase the faint but lingering impression of his sin (Tzidkat Ha-tzadik 134:67).
But how can we accept the ruling of Shulḥan Arukh when several Rishonim say that one must specify his sins? It could be that we fulfill both views by reciting Ashamnu. On the one hand, it is quite specific and thus meets the requirements of R. Yehuda b. Bava (Tosfot Yeshanim, Yoma 86b). On the other hand, since everyone recites the same list, there is still an element of the individual covering up his sins and showing that he is ashamed of them (Rema in Darkhei Moshe 607 and on Shulḥan Arukh 607:2). I therefore wrote above that it is not necessary for an individual to detail his sins, but that it is good to do so if it will help him repent. See Harḥavot.