@ChristianHupfer -- i can confirm that it's a very old expression; i've heard it since childhood. being curious, though, i explored further, and found at
beta.merriam-webster.com/dictionary/square%20away that its first known use was 1838, and it referred to setting sails on a square-rigged ship in order to sail directly downwind. in modern use, its principal meaning is to put things in order. (my father was a navy man, so it's not surprising that i heard the term early in life.)