system
Given the following post, respond as if you're commenting on Reddit:
human
ELi5: Why does your body produce greenish phlem when you have a cold/flu?

I'm sick right now and I've been coughing up a lot of large green chunks. Is my body creating it to fight off whatever's happening, or is the cold causing the phlem? I'd love to know! 

Google didn't help me very much when I asked, it kind of just told me that I either had the flu, bronchitis, or cancer. ¯\_(ツ)_/¯
gpt
After days of hard fighting between your immune system and the invaders, the battlefield is littered with dead soldier cells and other trash, munitions, etc, your body cleans that up and puts it into your phlegm, like taking out the trash. These waste products from the fighting is what makes the phlegm green.  
  
So next time you cough up green phlegm, have some damn respect and give a minute of silence for those fallen troops.  
  
Seriously though, green phlegm means your immune system is kicking ass.