Does having green phlegm definitely means an infection. I spit a mouthful when I woke up this morning then it was all clear n once green n clear again?

It means inflammatio. N. Whether infectious, environmental, bacterial vs viral, allergy related, it does not specifically points one way or another. It may also mean that overnight, these secretions sat in your airways and changed in color...