As you can see, "almost" is a synonym for definition 2a of "nearly" -- but it is not a synonym for the other two senses. Definition 2b for "nearly" really only appears in negative sentences.almost, adv.
very nearly but not exactly or entirely, e.g., almost there
1. in a close manner or relationship, e.g., nearly related
2a. almost but not quite, e.g., nearly identical
2b. to the least extent, e.g., not nearly as good as we expected