Look for orphaned packages and asks whether you want to remove, like this:

sudo pacman -Rs $(pacman -Qtdq)