Abu Musa Ashari reported,

The Prophet ﷺ used to make this supplication, "My Lord, forgive me my sins, my ignorance, my excess in all my affairs, and whatever You know about me better than I do. O Allah, forgive me my sins, my deliberate wrongs, my ignorance, my jesting, all of which I have committed. O Allah, forgive me what I have done before and what I will do later, what I have concealed and what I have made public. You are the One who brings forward and You are the One who delays, and You have power over all things."Ubaydullah bin Muaz said, "My father narrated to us, Shuba narrated to us, from Abu Ishaq, from Abu Burda bin Abu Musa, from his father, from the Prophet ﷺ, something similar."

Bukhari 6398

Sahih

حدثنا محمد بن بشار حدثنا عبد الملك بن صباح حدثنا شعبة عن أبي إسحاق

عن ابن أبي موسى عن أبيه

عن النبي ﷺ أنه كان يدعو بهذا الدعاء رب اغفر لي خطيئتي وجهلي وإسرافي في أمري كله وما أنت أعلم به مني اللهم اغفر لي خطاياي وعمدي وجهلي وهزلي وكل ذلك عندي اللهم اغفر لي ما قدمت وما أخرت وما أسررت وما أعلنت أنت المقدم وأنت المؤخر وأنت على كل شيء قدير وقال عبيد الله بن معاذ وحدثنا أبي حدثنا شعبة عن أبي إسحاق عن أبي بردة بن أبي موسى عن أبيه عن النبي ﷺ بنحوه

البخاري 6398صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Supplications
Chapter
His saying, "O Allah, forgive me for what I have done and what I have yet to do"
Numbering
Darussalam 6398
Bukhari 6398