A quick-and-dirty rule would be to say that "all but [noun phrase]" carries the first meaning while "all but [adjective or verb] carries the second.
And you cannot apply it to an adjective that is modifying a noun unless you put hyphens between the parts--including the adjective, like in this example:
"I saw his all-but-perfect face on posters all over town."
Since "the weakest plants" is a noun phrase, "all but the weakest plants" means "excluding the weakest plants. Because "rude" is an adjective, "all but rude" means a slightly weaker degree of rudeness. Because "ran" is a verb, "he all but ran" means he walked very, very fast.
To illustrate the last point: "I saw his all-but-perfect face on posters all over town."