What is the meaning of [Don’t pour out the dirty water before you have clean]

In countries where water is in short supply it has to be carefully and
sparingly used. By extension the proverb means that you should not discard
anything until you have made sure of a replacement. For example, don’t through
away the stump of a pencil until you have provided yourself with a new one; if
you wish to jot down an important note while it is fresh in your mind, it is
better to have the stump than no pencil at all.