Yes, I agree with Joseph.
Whenever my sourdough goes mouldy I throw it out, wash the container well and sometimes sterilise the container and lid with heat, and start over. I start with just whole wheat flour and
water, and usually after a couple of days I'll make my first batch and it doesn't rise very well, but then I use a little of it to start the second batch, which usually comes out well. It goes mouldy if I don't use it / refresh it with a week. It lasts longer in cool weather or the fridge, and can go mouldy in just a couple of days in hot weather.