Shopbought brown sugar technically lasts forever, but will lose flavor. Homemade brown sugar has wet molasses mixed in, so don't keep it for more than 3-4 weeks. Do keep an eye out for mold or bugs, in which case, it's definitely time to toss!