I mistakenly flagged this answer as spam. The flag was rejected. At first I tought the reason was that in first place the answer, on-topic or not, didn't refer to any paid software, but just to a bash script released under Public Domain license. But upon a second look the answer even looked on-topic. So indeed the answer didn't qualify as spam, and that was my mistake. But it's unclear to me when exactly an explicitly self-promoting answer about free software qualifies as such, if it does. For some reason, people spam-promote free software as well: link for those who can see deleted questions and link for those who can't, and to be honest it's unclear to me why this happens. Now the linked question wasn't a question in first place, so there's no concern about whether it should have been deleted or not. But since similiar, even tough maybe not so explicit things might happen even in answers, this is something I feel it should be taken care of, since such answers indeed do not make up a high quality post.
So, in general, where do I draw the line and why? And once I've determined that a post have stepped out of it, should I limit myself to downvote it or should I flag it when it's too explicitly self-promoting?