The Prophet ﷺ used to make this supplication, "Lord, forgive me my sins, my ignorance, my excess in all my affairs, and whatever You know better than I do. Allah, forgive me my sins, my deliberate wrongs, my ignorant ones, my jests, and all of these are found in me. Allah, forgive me what I have sent ahead and what I have left behind, what I have concealed and what I have made public. You are the One who brings forward and You are the One who puts back, and You have power over all things."
عن النبي ﷺ أنه كان يدعو بهذا الدعاء: رب اغفر لي خطيئتي وجهلي وإسرافي في أمري كله، وما أنت أعلم به مني، اللهم اغفر لي خطاياي، وعمدي، وجهلي، وهزلي، وكل ذلك عندي، اللهم اغفر لي ما قدمت وما أخرت، وما أسررت وما أعلنت، أنت المقدم، وأنت المؤخر، وأنت على كل شيء قدير.
Bukhari narrated it in the Book of Supplications (6398), and Muslim in the Book of Remembrance and Supplication (2719), both of them from Muhammad bin Bashshar, who said, Abdul-Malik bin Sabbah Masmai narrated to us, who said, Shuba narrated to us, from Abu Ishaq, from Abu Burda bin Abu Musa Ashari, from his father, and he mentioned it. The wording is Bukhari's, and Muslim did not give the wording for this chain, but rather referred back to the chain before it.