This will sound cantankerous, and I should preface this by saying I
hate decks both aesthetically and for this sort of reason.
But anyway, if it's that big a mess you'll need to dig in and see if
you have termites, carpenter ants, mold, or more extensive damage.
(I am off now to spread more cheer !)