These three expressions, “all but”, “anything but”, and “everything but”, are among the most confusing in the English language for native speakers of other languages. Although “all”, “everything” and “anything” are all similar in meaning, when they are followed by “but”, they can mean completely different things!
One of the meanings of the word “but” is “except”, and you can find all three expressions used in their literal meanings (i.e. “all except”, “anything except” and “everything except”), e.g.
What would you like to eat? I want anything but the chocolate cake.
Would you like me to gift-wrap everything? Everything but the candles, please.
However, more often than not, you will see these three expressions used idiomatically:
All but
“All but” means “almost”, “nearly” (which does not make much sense, I must admit, but that’s just the way it is). For example:
It was all but impossible.
could be expressed without using “all but” as
It was nearly impossible.
Anything but
“Anything but” can be rephrased using “not at all” or “in no way”. For example:
This smartphone is anything but ordinary.
which means the same as
This smartphone is in no way ordinary.
Everything but
The meaning of “everything but” is quite literal; it means “everything except”, “everything with the exception of”. For example:
She wants everything but happiness for other people.
which means
She wants everything with the exception of happiness for other people.
Nonetheless, the meaning is not completely literal. When you eat “everything but meat”, it doesn’t mean that you eat every single food imaginable. It means that you feel strongly about not eating meat.