Can you help me understand the meaning of this sentence? [closed]

I came across a sentence which I found hard to comprehend since English isn't my first language.

The sentence is:-

Cleanliness is the virtue most worth having but one.

I couldn't understand the purpose of the usage of "but one" in this sentence.

I'll be grateful if you can shed some light on this.

Thank you.


Solution 1:

Cleanliness is the virtue most worth having but one.

You can paraphrase the sentence in this way:

Aside from one other virtue, cleanliness is the virtue most worth having.

The word but is being used as a preposition.

[Merriam-Webster]
preposition

1 a : with the exception of : BARRING
// no one there but me


In other words:

Cleanliness is the virtue most worth having barring one (other).