Clean the gunk out as needed. Only in treated water, I do mine in tank water first, then in treated water to finish cleaning.
Best advise I have received about fish keeping is to keep the filter media full of BB. Not get rid of it until it is falling apart.
Cleaning is necessary. Also though I don't use flakes anymore, as they cause a lot of ammonia, mainly due to over feeding.
I changed to use primarily Hikari foods, they are pelleted and don't break down so fast. When used as directed keep water clear!
Big partial water changes are necessary when the parameters are out of safe ranges.