Ter que/de vs Dever: Obligation and Advice
Ter que and ter de both express obligation in EP. Dever expresses moral obligation, strong recommendation, or probability. The three have different nuances of force and certainty.
PortuStories Editorial
European Portuguese Grammar Guide
Ter que + infinitive and ter de + infinitive both express obligation ("must", "have to"). In EP, ter de is slightly more formal; both are correct in speech.
Tenho que trabalhar amanhã.
I have to work tomorrow.
Tens de chegar a horas.
You must arrive on time.
Dever + infinitive expresses moral obligation, strong recommendation, or epistemic probability ("must be", "should").
Deves descansar mais.
You should rest more.
Recommendation.
Ela deve ter trinta anos.
She must be about thirty.
Probability/estimation.
Ter que/de implies external or practical necessity. Dever implies internal moral obligation or logical inference. To soften a suggestion, use the conditional: devias descansar mais.
From a PortuStories Story
O médico disse que tens de parar de fumar e que deves fazer exercício todos os dias.
The doctor said you have to stop smoking and should exercise every day.