Partner dumping me over hair odor

So I haven’t washed my hair in years. My new partner says my head/hair smells like a wet dog. It is either wash it or they are moving out. BTW, his butt region smells a lot also but who am I to complain. Any suggestions???.