An excellent use for an old, non-working refrigerator is as a powder magazine. You need to clean it out with a mild bleach solution to kill any mold, then dry it completely. I then put in dessicent bags and my powder. It helps keep the powder dry, and moderates the temperature swings (both high temp and low temp can promote powder breakdown). I've stored powder there without degradation for as long as 10 years. The magnetic seal acts as a weak wall in case of fire. Primers are stored in a separate refrigerator.
As noted, some replica powders do not store well. Black Canyon was particularly bad. An unopen, sealed container will last longer than an open one.
As far as Pyrodex, I have some over five years old and it's still performing with no noticable degradation. Other than a few bad actors such as Black Canyon, Clear Shot, etc, most powders will last 20+ years if kept dry and not too hot or cold. The biggest drawback is you can't take advantage of powder improvements (like Triple 7) if you've stockpiled a bunch of something else.