Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:17:23

And your Lord has decreed that you not worship except Him, and to parents, good treatment. Whether one or both of them reach old age ˹while˺ with you, say not to them ˹so much as˺, "uff," and do not repel them but speak to them a noble word.  

And your Lord has decreed, He has commanded, that you worship none save Him, and, that you show, kindness to parents, by being dutiful to them. If they should reach old age with you, one of them (ahaduhumā is the subject ˹of the verb˺) or both (a variant reading ˹for yablughanna˺ has yablughān, ‘both ˹should˺ reach’, in which case ahaduhumā would be substituting for the ˹dual indicator˺ alif ˹of yablughān˺) then do not say to them ‘Fie’ (read uffan or uffin, uffa or uffi, a verbal noun meaning tabban, ‘perish!’ or qubhan, ‘evil!’) nor repulse them, but speak to them gracious words, fair and gentle ˹words˺.
القرآن:١٧:٢٣

وَقَضَىٰ رَبُّكَ أَلَّا تَعْبُدُوا إِلَّا إِيَّاهُ وَبِالْوَالِدَيْنِ إِحْسَانًا ۚ إِمَّا يَبْلُغَنَّ عِنْدَكَ الْكِبَرَ أَحَدُهُمَا أَوْ كِلَاهُمَا فَلَا تَقُلْ لَهُمَا أُفٍّ وَلَا تَنْهَرْهُمَا وَقُلْ لَهُمَا قَوْلًا كَرِيمًا  

{وقضى} أمر {ربك أ} ن أي بأن {لا تعبدوا إلا إياه و} أن تحسنوا {بالوالدين إحسانا} بأن تبروهما {إما يبلغن عندك الكبر أحدهما} فاعل {أو كلاهما} وفي قراءة يَبْلُغان فأحدهما بدل من ألفه {فلا تقل لهما أف} بفتح الفاء وكسرها منونا وغير منون مصدر بمعنى تبا وقبحا {ولا تنهرهما} تزجرهما {وقل لهما قولاً كريما} جميلاً لينا.