Hmm, you do have valid point. We cannot wait long enough for old age to kill the old duke who previously was the Ruler, right? Then why do you appoint the Duke in the first place if you know you going have a hard time to remove her or him later on?
Who said they were appointed? A ruler can make themselves Duke depending upon government system I believe.
Also, rulers usually have enough popularity to become Duke regardless.