How long does applesauce last?
I found a stash of packaged six-packs (single servings) of applesauce in the back of the fridge that have probably been there, oh, 18 months to 2 years. They look intact from the outside, but are they still edible??
You can always use my Depression-era parents' rule of thumb: If you open it and there is no mould, then it's in fine shape. If there is a little mould on the top, scoop it off. Then, if it tastes OK and doesn't make you sick...well, it's still good. ;-]
From your description, these were clearly sealed as packaged. Assuming that they were a commercial product, they would have been fine on a shelf (assuming local temps didn't cause them to breach the seal).
Anyway, in a refrigerator they are fine. The only problems would be mold (visible, and not going to happen in the fridge) and fermentation (evidenced by bubbles, not going to happen if no outside contaniments since original packaging).
On the other hand, you can core a few apples, heat them in a pot with lemon juice, puree, cool, and have fresh applesauce in an hour. Won't last 2 years, alas.